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 trialNathan Reinauer
2,097 PointsI keep getting an error, but I have no idea why. I'm writing the code pretty much the same as in the lesson.
Getting a compiler error, but I don't know what it means.
var birds = new[]
{
new { Name = "Pelican", Color = "White" },
new { Name = "Swan", Color = "White" },
new { Name = "Crow", Color = "Black" }
};
var mysteryBird = new { Color = "White", Sightings = 3;
var matchingBirds = from b in birds where b.Color == mysteryBird.Color select new { BirdName = b.Name };
1 Answer
Steven Parker
231,198 PointsHow did you get past task 1?
Bogdan is right, you're missing the closing brace in the initialization of mysteryBird. But that should've been done for task 1 — did you accidentally remove it while working on task 2?
Bogdan Cabaj
16,349 PointsBogdan Cabaj
16,349 PointsYou are missing a curly brace at the end of "var mysteryBird = new { Color = "White", Sightings = 3}; "