An Example of Collection Initialization : var : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » var »

 

An Example of Collection Initialization








    
 


using System.Collections.Generic;
using System;
public class MainClass {
    public static void Main() {
        List<string> presidents = new List<string> { "AAAA", "BBBBBB", "CCCCCCCC" };
        foreach (string president in presidents) {
            Console.WriteLine(president);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» var