List.ForEach : List « System.Collections.Generic « C# / C Sharp by API






List.ForEach

  
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;

public class MainClass
{
    public static void Main()
    {
        List<int> intList = new List<int>(new int[] { 3, 5, 15, 1003, 25 });
        
        intList.ForEach(delegate(int x) { Console.WriteLine(x); });

    }
}

   
    
  








Related examples in the same category

1.new List()
2.extends List
3.List.Add
4.List.AsReadOnly()
5.List.Capacity
6.List.ConvertAll
7.List.Count
8.List.Remove()