Mega Code Archive

 
Categories / C# Tutorial / LINQ
 

Create and initialize the list of Simple type with new syntax

using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; public class MainClass{    public static void Main(string[] args){             List<String> Names = new List<string>          {             "A",             "Z",             "C",             "R"          };          foreach (String ThisName in Names)             Console.WriteLine(ThisName);    } }