Is there any method like ForEach for IList? [duplicate]

Use a foreach loop:

foreach (var p in names) {
    Console.WriteLine(p);
}

There is no reason to use delegates and extension methods all over the place if that doesn’t actually improve readability; a foreach loop is not any less explicitly telling readers what’s being done than a ForEach method.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)