Visual Studio 2012 predefined Data Types

Source: Internet
Author: User

Predefined Data Types

 

I. Value Type

Integer: (integer)

The difference between signed integer and unsigned integer is that the signed negative and unsigned are all positive, 2x + 1

Common int

Signed: with positive and negative numbers, the range is increased in ascending order of writing.

Sbyte-128 to 127 signed 8-digit integer

Short-32,768 to 32,767 signed 16-digit integer

INT-2,147,483,648 to 2,147,483,647 signed 32-bit integer

Long-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 signed 64-bit integer

Unsigned: only positive numbers exist, and the range is increased in sequence by writing.

Byte 0 to 255 unsigned 8-digit integer

Ushort 0 to 65,535 unsigned 16-digit integer

Unit 0 to 4,294,967,295 unsigned 32-bit integer

Ulong 0 to 18,446,744,073,709,551,615 unsigned 64-bit integer

 

Floating Point: (with decimal point)

Float-3.4x1038 to + 3.4x1038 7 digits

Double ± 5. 0 × 10 − 324 to ± 1. 7 × 10308 15 to 16 digits

Decimal (-7.9x1028-7.9x1028)/(100-28) 28-29 valid digits

 

Character Type: (UNICODE type)

Single quotation marks are required for definition :''

Char char = 'Hello world'

String type:

String is equivalent to the concept of character type and has a long length. Double quotation marks are required for definition :""

 

Boolean: bool is generally used for judgment. (User login verification .)

(True, false)

 

Datetime type

Datetime

 

Enumeration type:

Enum E (...) User-Defined type

Structure Type:

Struct s (...) User-Defined types are usually used to encapsulate small variable groups.

 

Ii. Reference Type

String type

String is equivalent to the limit type concept. Double quotation marks are required for long definition.

 

Class type

Object can be compatible with all other types of final base class conversion

Class C (...) User-Defined type

 

Interface Type:

Interfacei (...)

Array type:

One-dimension and multi-dimensional arrays. For example, int [] defines a group and INT [,] defines two groups.

 

Visual Studio 2012 predefined Data Types

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.