The differences between string and string are discussed.

Source: Internet
Author: User
I have checked the differences between the two, but it is not very clear after several days, and I have not understood the differences between the two. I will query the online discussion again today, the main points are as follows:

  • String is a class in C,String is A. NET Framework class (blue is not displayed in C # IDE)
  • C # string ing is the string of. NET Framework.
  • 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.
  • If C # is used, we recommend that you use string to conform to the specifications.
  • String always represents system. string (1.x) or: system. string (2.0), string indicates system only when there is using system; in front of it and the namespace does not contain the string type (class, struct, Delegate, Enum. string
  • 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. 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.