下面程序运行的结果是: public class test{ private ArrayList Names = new ArrayList(); public test(string[] names) { foreach (string name in names) this.Names.Add(name); } public string this[int index] { get { return Names[Names.Count - index].ToString(); } } static void Main() { String[] names = new string[] { "A", "B", "C", "D" }; test t = new test(names); Console.WriteLine(t[3]); } }}
发布时间:2024-03-31 20:55:04