The differences between string and string in C #

Source: Internet
Author: User

1. String is a class in C,
String is a class of the. NET Framework. (in C # IDE, the dark colors are not displayed, and the hidden colors are displayed)
String that is reflector as. NET Framework

2. If you use string, the Uploader will convert it into string,
So if you use a string directly, you can reduce the number of referers. Actually, there is no difference between them.

3. If C # is used, it is recommended to use string, which complies with the rules. Returns the string that indicates system. String (1.x) or: system. String (2.0 ),
String is equivalent to system. String only when "using system;" is specified in the preceding namespace.

4. String is keyword, and struct string is not. That is to say, string cannot be used as the name of a class, structure, component, field, variation, method, or modularity;
String is acceptable.

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.