题目内容
(请给出正确答案)
[单选题]
类MyClass中有下列方法定义:public void testParams(params int[] arr){ Console.Write(“使
用Params参数!”);}public void testParams(int x,int y){ Console.Write(“使用两个整型参数!”);}请问上述方法重载有无二义性?若没有,则下列语句的输出为()。MyClass x=new MyClass(); x.testParams(0); x.testParams(0,1); x.testParams(0,1,2);
A.有语义二义性
B.使用Params参数!使用两个整型参数!使用Params参数!
C.使用Params参数!使用Params参数!使用Params参数!
D.使用Params参数!使用两个整型参数!使用两个整型参数!
查看答案
如果结果不匹配,请 联系老师 获取答案