int

System.Int32
(32 bits) -2,147,483,648 to 2,147,483,647


System.Int32 myInt; 
int myInt;

myInt = 7;
myInt = 2;
myInt = 7/2; '= 3 not 3.5

Converting

// int to long 
int myInt = 2;
long myLong = myInt;

// long to int
long myLong = 200;
int myInt = myLong;

// int to short
int myInt = 2;
short myShort = myInt;

// short to int
short myShort = 2;
int myInt = myShort;


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext