Difference between string and string in C #

Source: Internet
Author: User

1. String is the class in C #, and string is the class of. NET Framework (blue is not displayed in C # IDE );

2. C # string ing is the string of. NET Framework;

3. If a string is used, the compiler will compile it into a string. Therefore, if a string is used directly, the compiler will do less work;

4. If C # is used, we recommend that you use string to conform to the specifications;

5. String always represents system. String (1.x) or: system. String (2.0 );

6. String indicates system. String only when using system; is in front and the namespace does not contain the string type (class, struct, Delegate, Enum;

7. string is a keyword, and string is not. That is to say, string cannot be the name of a class, structure, enumeration, field, variable, method, or attribute, but string can;

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.