首页 > 开发 > 综合 > 正文

关于C#的问答

2024-07-21 02:29:36
字体:
来源:转载
供稿:网友

 

q:c#支持多继承吗?
a:不
q:protected class访问级别如何?
a:允许本类和子类访问
q:private class变量可以被继承吗?
a:行,但不能被访问,但可以被继承
q:描述一下protected internal
a:只有派生类型或同一程序集中的类型才能访问该成员。
q:what does the term immutable mean?
a:the data value may not be changed.  note: the variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.
q:system.string 和system.text.stringbuilder 的区别?
a:
q:能将不同类型的数据存在system.array中吗?
a:不能

q:system.array.copyto() 和 system.array.clone()区别?

a:the clone() method returns a new array (a shallow copy) object containing all the elements in the original array.  the copyto() method copies the elements into another existing array.  both perform a shallow copy.  a shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.  a deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表