static void Main(string[] args) { // Declare an instance of the SampleCollection type. SampleCollection <string> stringCollection = new SampleCollection <string>(); // Use [] notation on the type. stringCollection[0] = "Hello, World"; }
static void Main(string[] args) { // Declare an instance of the SampleCollection type. SampleCollection <string> stringCollection = new SampleCollection <string>(); // Use [] notation on the type. string firstElement = stringCollection[0]; }