assigning the int value to a double variable. The conversion is implicit because a double is a larger data type than an int and can hold larger values with decimals.
we create an int variable myInt with a value of 42. We then assign that value to a double variable myDouble using the implicit conversion. Finally, we output the value of myDouble, which is 42.0.
use the Convert.ToInt32() method or the type cast (int) operator.
Note that when converting from a double to an int, the decimal portion of the number is truncated.