c#單選題精選360題

时间:2022-01-06 05:26:05
【文件属性】:
文件名称:c#單選題精選360題
文件大小:104KB
文件格式:DOCX
更新时间:2022-01-06 05:26:05
c# 18、C#中TestClass为一自定义类,其中有以下属性定义 public void Property{…} 使用以下语句创建了该类的对象,并使变量obj引用该对象: TestClass obj = new TestClass(); 那么,可通过什么方式访问类TestClass的Property属性? ( a ) a) Obj,Property; b) MyClass.Property; c) obj :: Property; d) obj.Property (); 19. 在C#中,表示一个字符串的变量应使用以下哪条语句定义?( b ) a) CString str; b) string str; c) Dim str as string d) char * str; 20、下列关于C#面向对象应用的描述中,哪项是正确的?( c )。 a) 派生类是基类的扩展,派生类可以添加新的成员,也可去掉已经继承的成员 b) abstract方法的声明必须同时实现 c) 声明为sealed的类不能被继承 d) 接口像类一样,可以定义并实现方法 21、C#中导入某一命名空间的关键字是( a )。 a) using b) use c)import d) include 22、一般情况下,异常类存放在什么命名空间中?( b )。 a) 生成异常类所在的命名空间 b) System.Exception命名空间 c) System.Diagnostics命名空间 d) System命名空间

网友评论