RosettaCodeData/Task/Collections/C-sharp/collections-3.cs

9 lines
271 B
C#

//Create and initialize List
List<string> myList = new List<string> { "Hello", "World", "!" };
//Create List and add some values
List<string> myList2 = new List<string>();
myList2.Add("Hello");
myList2.Add("World");
myList2.Add("!");