The difference between string and string

Source: Internet
Author: User

Overview

This article focuses on the difference between string and strings, with little specific knowledge of string and string.

String

String is a class in C #, and string is a class of the. NET Framework (does not display blue in the C # IDE)
String always represents System.String (1.x) or:: System.String (2.0), string is only preceded by the using System and there is no type named string in the current namespace (class, struct, delegate, enum) is only representative of System.String

String

string mapped to a. NET Framework string

Sring is a keyword, string is not, that is, string cannot be the name of a class, struct, enumeration, field, variable, method, property, and string.

Summarize

If a string is used, the compiler compiles it into a string, so the compiler can do a little bit less work if you use string directly. If you use C #, we recommend that you use string to compare compliance

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The difference between string and string

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.