static void Main() { var stringCollection = new SampleCollection <string>(); stringCollection.Add("Hello, World"); System.Console.WriteLine(stringCollection[0]); }