public static void Main()
var val = GetRandomDecimal(0, 100, 2);
Console.WriteLine(val.ToString());
static System.Random rnd = new System.Random();
public static decimal GetRandomDecimal(int minValue, int maxValue, int decimalPlaces)
return System.Math.Round( Convert.ToDecimal(rnd.NextDouble() * (maxValue-minValue) + minValue) , decimalPlaces);