The in
keyword has three uses:
- As part of the syntax in a
foreach
statement or as part of the syntax in a LINQ queryforeach (var member in sequence) { // ... }
- In the context of generic interfaces and generic delegate types signifies contravariance for the type parameter in question:
public interface IComparer<in T> { // ... }
- In the context of LINQ query refers to the collection that is being queried
var query = from x in source select new { x.Name, x.ID, };
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents