[lang-ref] ( filter_with_lambda ) ( csharp )
[Fact]
public void TestFilterWithLambda()
{
// items.Where(x => ..)
List<int> items = new() { 1, 2, 3, 4, 5, 6 };
List<int> expected = new() { 2, 4, 6 };
List<int> actual = items.Where(x => x % 2 == 0).ToList();
Assert.Equal(expected, actual);
}