Questions and Answers about C #

Source: Internet
Author: User
Tags array copy shallow copy

Does q:c# support multiple inheritance?
A: No
What is the Q:protected class access level?
A: Allow access to this class and subclass
Can q:private class variables be inherited?
A: line, but cannot be accessed, but can be inherited
Q: Describe protected internal
A: Only derived types or types in the same assembly can access the member.
Q:What does the term immutable mean?
A:The data value may is changed. Note:the variable value may changed, but the original immutable data value is discarded and a new data value was Crea Ted in memory.
The difference between q:system.string and System.Text.StringBuilder?
A:
Q: Can different types of data exist in System.Array?
A: No

Q:system.array.copyto () and System.Array.Clone () difference?

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  NAL 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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.