相关代码 |
|
using System; class myIndex { string[] myArray={"java","C++","C#"}; public myIndex() { } public string this[int index] { get { return myArray[index]; } } } class indexerTest { public static void Main() { myIndex index1=new myIndex(); for(int i=0;i { Console.WriteLine(index1[i]); } } }
相关资源 |
|