CLR VIA C #: Primitive types, reference types, and value types

Source: Internet
Author: User

The difference between a primitive type, a reference type, and a value type;

1. Primitive type (primitive type): The data type directly supported by the compiler, and primitive types directly mapped to types that exist in the FCL.

C # Lowercase is a primitive type, for example: string, uppercase is the FCL type, such as String, primitive types are directly mapped to the FCL type, so there is no difference between the two, the same, not tangled in which way to use.

Supports direct use of the FCL type, does not use primitive type, Float corresponds to single FCL type; dynamic corresponds to System.Object FCL type;

2, C # default is overflow check off, operator checked() and unchecked() can control overflow check in a specific area;

CLR VIA C #: Primitive types, reference types, and value types

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.