在C#中,观察下列代码,给出对应的结果(): ArrayList list = new ArrayList() { };
Customer teng = new Customer(" 马腾 ", 32, " 汕头市 ");
Customer yun = new Customer(" 马云 ", 33, " 汕头市 "); list.Add(teng);
list.Add(yun); Console.WriteLine((list[2] as Customer).Name);
A程序编译不通过,不能运行
B马云
C程序运行报错
D空字符串
相关试题
-
在C#中,观察下列代码,给出对应的结果(): ArrayList list = new ArrayList() { }; Customer teng = new Cus
-
teng = new Customer(" 马腾 ", 32, " 汕头市 "); Customer yun =
-
在C#中,观察下列代码给出最后的结果: ArrayList list = new ArrayList(2); Console.WriteLine("
-
在C#中,观察下列代码得出,选出正确的结果()        Array
-
{ Console.Write("B"); } public new void Fun()