试题详情

在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空字符串