public class Example
{
public static void Main()
{
Console.Write("<< Linq - Enumerable.Take 출력 예제 >> \n");
int[] grades = { 59, 82, 70, 56, 92, 98, 85 };
IEnumerable<int> topThreeGrades = grades.OrderByDescending(grade => grade).Take(3);
Console.WriteLine("상위 3개 등급 : ");
foreach (int grade in topThreeGrades)
{
Console.WriteLine(grade);
}
Console.WriteLine(System.Environment.NewLine);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}