using System;
using System.Linq; // 查詢語言 API
using System.Collections.Generic; // 集合 - List 清單
public class Program
{
public int[] scores = {10, 10, 50, 30, 2, 5, 6, 7, 8, 9, 99, 77, 35, 10 };
public void Main()
List<int> score0 = scores.ToList(); // 轉 清單
var result = score0.Where(x => x >= 60); // 查詢(變數名稱 => 條件) - a => b 黏巴達 Lambda
Console.WriteLine("及格人數:" + result.ToList().Count); // Count 數量
}