The Convert class
provides methods which can be used to convert datatypes. The target datatype needs to be specified in the equivalent .NET datatype
Each Primitives Datatype has an Parse and TryParse method as well which can be used to cast
Value Overflow
In C# there is no overflow checking. If we exceed the capacity of the datatype the value will wrap around
If we need to check for such overflow in the code we can make use of the “checked” block which will raise an exception if an overflow occurs
What’s the main difference between int.Parse() and Convert.ToInt32 - Stack Overflow