This is the object initializer for the anonymous class. It creates an object with a single Name property, with the value "John". Since you have no way to refer to an object, you should use it immediately, as in the LINQ statement, or as a parameter, as you mentioned.
See also this answer .
source share