Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

C#

Learn step by step



Data Types

C# provides following types data types

  • Value types
  • Reference types
  • Pointer types

Value Types

Data TypesSizeValues
sbyte 8 bit -128 to 127
byte 8 bit 0 to 255
short 16 bit -32,768 to 32,767
ushort 16 bit 0 to 65,535
int 32 bit -2,147,483,648 to 2,147,483,647
uint 32 bit 0 to 4,294,967,295
long 64 bit -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
ulong 64 bit 0 to 18,446,744,073,709,551,615
char 16 bit 0 to 65535
float 32 bit -1.5 x 1045 to 3.4 x 1038
double 64 bit -5 x 10324 to 1.7 x 10308
decimal 128 bit -1028 to 7.9 x 1028
bool --- True or false

Reference Types

Data TypesSizeValues
String Variable length 0-2 billion Unicode characters
object --- ---

Pointer Types

Pointer type variables store the memory address of another type. Pointers in C# have the same capabilities as in C or C++.
type* identifier;



Related Videos