单项选择题
类MyClass定义如下:

现在需要添加一个类构造函数。下列选项中哪个是正确的?()
A.static MyClass(){……}
B.static MyClass(inti){……]
C.public static MyClass(){……}
D.public MyClass(){……}
点击查看答案
相关考题
-
单项选择题
通用类型系统中的一切值类型都是继承自()。
A.System Base
B.System Type
C.System Int32
D.System Value -
单项选择题
设计类MyClass时,若希望字段data只能被同一程序集的其他类访问,可将该字段的询问修饰符设为()
A.internal
B.protected
C.private
D.public
E.internal protected -
单项选择题
接口IMyInterface中只包含一个属性MyName.该属性满足: 公有 可读可写 字符串类刑 则该接口的定义应为()
A.interface MyInterface{string MyName{get;set;}}
B.interface MyInterface{int MyName{get;set;}}
C.interface MyInterface{string MyName{get{}set{}}
D.interface MyInterface{string MyName{get{};set{};}