C#언어



LINQ(C#의 꽃)

Query(LINQ관련)

// Specify the data source.
int[] scores = [97, 92, 81, 60];

// Define the query expression.
IEnumerable<int> scoreQuery =
    from score in scores
    where score > 80
    select score;

// Execute the query.
foreach (var i in scoreQuery)
{
    Console.Write(i + " ");
}

// Output: 97 92 81

물어보고 싶거나 하고 싶은말 써 주세요comment|🔝|