Implicit Casting (automatically) - converting a smaller type to a larger type size
char -> int -> long -> float -> double
Explicit Casting (manually) - converting a larger type to a smaller size type
double -> float -> long -> int -> char
using System; namespace MyApplication{ class Program { static void Main(string[] args) { int myInt = 10; double myDouble = 5.25; bool myBool = true; Console.WriteLine(Convert.ToString(myInt)); // Convert int to string 10 Console.WriteLine(Convert.ToDouble(myInt)); // Convert int to double 10 Console.WriteLine(Convert.ToInt32(myDouble)); // Convert double to int 5 Console.WriteLine(Convert.ToString(myBool)); // Convert bool to string True } }}
cr. https://www.w3schools.com/cs/cs_type_casting.asp