The Default Value Types

Posted on Updated on

The Default Value type

Class/Structure Name

Data Type in C#.NET 

NO. of Bytes 

 Range

 Integer

 System.Byte

 Byte

 1(Unsigned)

 0 to 255

 

 System.SByte

 Sbyte

 1(Signed)

 -128 to 127

 

 System.Int16

 Short

 2(Signed)

 -32,768 to 32,767

 

 System.Uint16

 Ushort

 2(Unsigned)

 0 to 65,535

 

 System.Int32

 Int

 4(Signed)

 -2,147,483,648 to 2,147,483,647

 

 System.Uint32

 Uint

 4(Unsigned)

 0 to 4,294,967,295

 

 System.Int64

 Long

 8(Signed)

9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

 

 System.Uint64

 Ulong

 8(Unsigned)

 0 to 18,446,744,073,709,551,615

 Float

 

 

 

 

 

 Single

 Float

 4

 ±1.5e−45 to ±3.4e38
(Precision:7 digits)

 

 Double

 Double

 8

 ±5.0e−324 to ±1.7e308
(Precision:15-16 digits)

 

 Decimal

 Decimal

 16

 (-7.9 x 1028 to 7.9 x 1028) / (100 to 28)
(Precision:28-29 digits)

 Character

 

 

 

 

 

 Char

 Char

 2

 0 to 65535

 

 String

 String

 size varies

 Alphabets, numbers & special characters

 Other

 

 

 

 

 

 DateTime

 DateTime

 8

 

 

 Boolean

 Bool

 1

 

 

 Object

 Object

 size varies

 Can store any type of value

Advertisements

One thought on “The Default Value Types

    vissicomp2013 responded:
    October 30, 2013 at 10:03 am

    The Default Value Types

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s