4) C# Data Types,

                                          C# Data Types


Data Types in a programming language describes that what type of data a variable can hold . CSharp is a strongly typed language, therefore every variable and object must have a declared type. The CSharp type system contains three Type categories. They areValue Types , Reference Types and Pointer Types . In CSharp it is possible to convert a value of one type into a value of another type . The operation of Converting a Value Type to a Reference Type is called Boxing and the reverse operation is called Unboxing .

.NET TypeRange (values)
Byte0 to 255
SByte-128 to 127
Int32-2,147,483,648 to 2,147,483,647
UInt320 to 4294967295
Int16-32,768 to 32,767
UInt160 to 65,535
Int64-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
UInt640 to 18,446,744,073,709,551,615
Single-3.402823e38 to 3.402823e38
Double-1.79769313486232e308 to 1.79769313486232e308
CharUnicode symbols used in text
BooleanTrue or False
Object
String
Decimal(+ or -)1.0 x 10e-28 to 7.9 x 10e28
DateTime0:00:00am 1/1/01 to 11:59:59pm 12/31/9999

Comments

Popular Posts