CTS,. netframeworkcts in. NET FrameWork

Source: Internet
Author: User

CTS,. netframeworkcts in. NET FrameWork

CTS: Common Type System general Type System.

1. Not only can C # be compiled into. Net IL, but also supports Basic, Python, Ruby and other languages, and even Java. Data Types in different languages are defined differently.. Net defines general data types (CTS, Common Type System): String, Int16, Int32, Int64, Boolean, and Double. By going to the definition, we can see that these are all classes (struct ).

2. Int64 → long, Int32 → int, Int16 → short, String → string, Boolean → bool.

Each language defines its own type.. Net provides a public type through CTS, and then translates the corresponding. Net type.

3. C # The original types such as string, int, long, bool, and double are defined in the language specification. the compiler translates these types into CTS classes. Through decompilation, we can see IL.

4. string is the class in c #, and String is the class of. net Framework CTS.

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 standard.

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.