I am trying to loop only 3 times through a C# List.This is my code so far.
IEnumerable<Artist> threeoldest = Artists.Where(Artist=> Artist.Hometown == "Atlanta").OrderByDescending(Artist=>Artist.Age);
I only want to get the first 3 rows, since the list is already in descending order.
for(int i = 0; i <= 2; i++)
{
System.Console.WriteLine(threeoldest[i].RealName);
System.Console.WriteLine(threeoldest[i].Age);
}