Differences between string and string in C #

Source: Internet
Author: User

C #, string declaration, do you use string or string?
String? String? There is only one case-insensitive question. Which one do you prefer? Do you know the specific difference?
I am used to using string. The difference is that I recently found the authoritative basis, 'clr via C #'.
In fact, string is the name of the CLR type (also called keyword), while string is the keyword in C. The number of lines added by default during C # CompilationCode, You will understand the difference between string and string!
Using string = system. string; using sbyte = system. sbyte; using byte = system. byte; Using Short = system. int16; using ushort = system. uint16; using Int = system. int32; using uint = system. uint32 ;......
Right! Using string = system. String; C # compiler automatically converts string to sysem. String!
In CLR via C #, Jeffrey Richter recommends coding to use the default CLR type, that is, do not use string or string; do not use int to use int32! As for why, let's take a look at this book, very useful!

Http://www.free56.cn/post/43.html

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.