Programming Languages

Hello, I’m working on the final project for C#, Programming Languages. Here is the link: https://www.codecademy.com/courses/learn-c-sharp/projects/csharp-programming-languages

I am stuck on step 8. I am able to query the Name of programming languages, but I don’t know how to use Count() in the query string. Here is my code:

var lString = languages
.Where(l => l.Year >= 1995 && l.Year <= 2005);

      foreach(var a in lString)
      {
        Console.WriteLine(a.Name);
      }

Never mind, I figured it out. I’ll post it here:

int count = languages
.Where(l => l.Year >= 1995 && l.Year <= 2005).Count();

      Console.WriteLine(count);
1 Like