728x90
728x170

return; 으로 처리하면 된다.

var list = new List<int>() {1, 2, 3, 4};
list.ForEach(i => 
    {
        if (i == 3)
            return;
        Console.WriteLine(i);
    }
);

결과 
1
2
4

728x90
그리드형
Posted by kjun
,