單項選擇題

類MyClass定義如下:

現(xiàn)在需要添加一個類構(gòu)造函數(shù)。下列選項中哪個是正確的?()

A.static MyClass(){……}
B.static MyClass(inti){……]
C.public static MyClass(){……}
D.public MyClass(){……}


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題通用類型系統(tǒng)中的一切值類型都是繼承自()。

A.System Base
B.System Type
C.System Int32
D.System Value

3.單項選擇題

接口IMyInterface中只包含一個屬性MyName.該屬性滿足:
               公有 
              可讀可寫
              字符串類刑
則該接口的定義應(yīng)為()

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{};}