Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
231,198 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.