int whole = 9; double decimalValue = whole; // automatic: int fits inside double Console.WriteLine(decimalValue); // Outputs: 9
Click Run to execute this code.