public class TestForLinq
{
private readonly int[] numbers = [ 0, 1, 2, 3, 4, 5, 6 ];
private IEnumerable<int> test_numbers;
public TestForLinq()
{
test_numbers = from _ in numbers
where (_ % 2 == 0)
select _;
}
public void Test() => test_numbers.ToList().ForEach(num => Console.WriteLine(num));
}
///
0
2
4
6
//
partial class : 그동안 개념을 안잡고 갔던 개념,
partila class test : window 을 예를 들어서 윈폼 상속 클래스 + 여러 파일에 분산해서 있는 부분 클래스라는 뜻, 사용자가 볼때만 분산되어 있고 실제 컴파일시에는 한개의 클래스로 처리됨