using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CS2026 { class MyClass { private string[] data = new string[5]; public string this[int index] { get { return data[index]; } set { data[index] = value; } } } class Program { static void Main(string[] args) { MyClass mc = new MyClass(); mc[0] = "CS2026"; mc[1] = "CS6110"; mc[2] = "CS7999"; Console.WriteLine("{0}, {2}, {1}", mc[0], mc[1], mc[2]); Console.ReadLine(); } } }