The difference between string and string (C #)

Source: Internet
Author: User

  1. Speaking from the location:

    1.String is a string inside the. NET framework, and a lowercase string is a string in the C # language

    2. If the using System is removed, there is no uppercase string, System is a function name in the. NET Framework class Library.

  2. from Sex Quality:

    1.string is a keyword, string is a class, String cannot be the name of a class, struct, enumeration, field, variable, method, property,

    3.string type represents a string of Unicode characters, string is Alias for string in the. NET Framework, more intuitive testing of string equality

  3. String Details:

    Description of String on MSDN: string is a alias for string in the. NET Framework

    Hehe string is the alias of String, is a.

string s = String. Empty: A string variable that points to an empty string, and S does not occupy storage space. s variables can be used, such as S. lengthstring s = ""; an empty string pointing to "s", which takes up a byte of storage space, because the escape character, "N", represents the end of the string. lengthstring s = null; A variable that does not refer to any of the storage spaces, s cannot be used

The difference between string and string (C #)

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.