To convert an Int32 value to a decimal, use the Convert.ToDecimal() method.
Int32 represents a 32-bit signed integer.
Let’s say the following is our Int32 value.
int val = 2923;
Now to convert it to decimal.
decimal decVal = Convert.ToDecimal(val);
Let us see the complete example.
Example
using System;
public class Demo {
public static void Main() {
int val = 2923;
decimal decVal = Convert.ToDecimal(val);
Console.WriteLine("Converted Int32 {0} to decimal {1:N2} value ", val, decVal);
}
}Output
Converted Int32 2923 to decimal 2,923.00 value