"One way to learn in C #" value types in data types

Source: Internet
Author: User

Just learned the value types in C # data type, in C #, the data type is divided into three, one is a value type, the other is a reference type, the last is not used, is the pointer type, this is used in C language, and now I do not understand!

Integer type:

Data type
Meaning
Range of values
SByte
Signed 8-bit integer
128 to 127
Byte
Unsigned 8-bit integer
0 to 255
Short
Signed 16-bit integer
32768 to 32767
UShort
Unsigned 16-bit integer
0 to 65535
int common
Signed 32-bit integer
231 Times to 231 square-1
UInt
Unsigned 32-bit integer
0 to 4294967295
Long
Signed 64-bit integer
It's too long.
ULong
Unsigned 64-bit integer
It's too long.






Definition method: int a=1,b=5455; it all looks like this.

Instance:

   static void main (String[] args)          {             int a = 111;            byte  b = 222;            long c  = 333;            console.writeline (a);             console.writeline (b);             console.writeline (c);             console.read ();         } 

Effect: 650) this.width=650; "Width=" 677 "height=" 443 "src=" https://sp0.baidu.com/-aYHfD0a2gU2pMbgoY3K/resource/ 1827f65dfb1e12d3c196101459072131.jpg "alt=" 1827f65dfb1e12d3c196101459072131.jpg "/>


This article from "Frank" blog, reproduced please contact the author!

"One way to learn in C #" value types in data 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.