The C # compiler is smart and removes useless instructions from Linq. Choosing c is useless, so the compiler removes it. When you write Select (c => c), the compiler cannot say that the instruction is useless because it is a function call, and therefore it does not delete it. If you delete it yourself, IL will become the same.
EDIT: Linq is a βdescriptiveβ language: you say what you want, and the compiler will convert it well. You have no control over this conversion. The compiler will try to optimize the function call and not use Select because you are not projecting, so this is useless. When you write Select (c => c), you call the function explicitly, so the compiler does not delete it.
var a = from c in companies select c; var a = c.Select(elt=>elt);
The selection is useful in this example. If you delete it, it will have type c; otherwise a is IEnumerable
source share