Closed xenophilios closed 3 years ago
Thanks for writing this @xenophilios
We cover the in
and out
modifiers in this article.
I'd recommend fixing this by adding a link to that article rather than repeating the information.
I've added the "up for grabs" and "good first issue" labels for any contributor that wishes to make this change.
Thank you for the link. The article at the end of it is very useful, but it seems to be dealing with a different issue.
@xenophilios I think that article is answering your question - the in
and out
modifiers are to indicate contravariance and covariance. Unfortunately the article does not mention the syntax.
This article does.
There's also a good Stack Overflow answer here.
Thank you very much!
Can you mention which file needs to be edited to resolve this issue?
Hello. I am planning on picking this issue. I have gone through the discussion and I figured out that I need to add this link about in and out inside the see also section of Constraints on type parameters - C# Programming Guide. Am i right? Can i pick up this?
This issue has been closed as part of the issue backlog grooming process outlined in #22351.
That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs
team for visibility.
Great article. Thank you. I would like to suggest that you add some explanation on the use of "in" and "out" as modifiers of generic type parameters. For example, the generic form of IComparable is given as IComparable<in T> and the generic form of IEnumerable as IEnumerable<out T>. If explanations are already available in other documents, perhaps you could let us know where to find them. Thank you for your trouble.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.