【单选题】下面的C#代码实现一个索引器: class TestIndex { public int[] Elements=new int[100]; public int Elements[int index] { get { retrun Elements[index]; } set { Elements[index]=value; } } } class Class1 { static void Mai...
【单选题】下面程序运行的结果是() class A { public string[] list = new string[10]; public int this[int index] { get { return Convert.ToInt32(list[index]); } set { list[index] = value.ToString(); } } public Hashtable list1...
【单选题】阅读下面的程序,写出程序输出结果(属性应用) namespace MyClassLib { public class Class1{ private int a=0; private int b=0; public Class1(int pa, int pb){ a = pa;b = pb; } public int A{ set{ if (value > 10) a = value;} get{...
【单选题】下面的C#代码实现一个索引器:代码最后的执行结果为( ) class TestIndex{ public int [] Elements = new int [ 100 ]; public int Elements[ int index ] { get {return Elements[ index ];} set {Elements[index] = value;} } } class Cl...