linq > Enumerable.Where(numbers, ...)


https://www.youtube.com/watch?v=wUhrYbq7t8g&index=5&list=PL90AF0EFFEF782D27
の7:40あたりを参考に。

sample.cs
using System;
using System.Linq;

public void Main()
{
    int[] numbers = new [] {3,1,4,1,5,9,2};
    var result = 
        Enumerable.Where(numbers, n => n < 4) //<-------
        .Select(n => n);
    foreach(int idx in result)
        Console.WriteLine(idx);
}
結果
3
1
1
2