System.Convert

If this conversion is not possible then an exception is thrown.
This class contains methods to convert from one base type to another.
This class provides conversion functions as static methods.
Although it is worth noting that the method names are different to the actual data type names.

int myint = 10; 
short myshort2 = System.Convert.ToShort(myint);

string mynumber = "14";
int myint2 = System.Convert.ToInt32(mynumber);

 ToBase64CharArray
 ToBase64String
boolToBoolean
byteToByte
 ToChar
 ToDateTime
 ToDecimal
shortToInt16
intToInt32
longToInt64
sbyteToSByte
floatToSingle
 ToString
ushortToUInt16
uintToUInt32
ulongToUInt64


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