The in keyword has three uses:

  1. As part of the syntax in a foreach statement or as part of the syntax in a LINQ query

    foreach (var member in sequence)
    {
        // ...
    }
    
  2. In the context of generic interfaces and generic delegate types signifies contravariance for the type parameter in question:

    public interface IComparer<in T>
    {
        // ...
    }
    
  3. 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, };