C# Querying With LINQ Query Operators Joins

Toni Dzalto
Toni Dzalto
21,667 Points

why is it Birds = bird?

I didnt understand why its not bird = bird when using GroupJoin

2 Answers

Steven Parker
Steven Parker
200,557 Points

One is a property, the other is a variable.

Remember, you are seeing this as part of the initialization of an object literal. The term "Birds" on the left side is the name of the object property that is being initialized. The term "bird" on the right side is the name of a variable that contains the value being assigned to that property.

The name Birds is used for the property to be consistent with the naming practices being observed for the objects in the project, and with previously created objects that this one might be compared against.