C#ArrayList.ForEach

Performs the specified action on each element of the List.

문법

list.ForEach(action)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

var
fruits
new
List
string
ForEach
Console
WriteLine
var fruits = new List<string> { "apple", "banana", "cherry" };
fruits.ForEach(f => Console.WriteLine(f));