xxxxxxxxxx
inputValue = Math.Round(inputValue, 2);
xxxxxxxxxx
myFloatVariable.ToString("0.00"); //2dp Number
myFloatVariable.ToString("n2"); // 2dp Number
myFloatVariable.ToString("c2"); // 2dp currency
xxxxxxxxxx
var s = Math.Round(23.22, 4); // 23.2200
var s = Math.Round(23.22, 5); // 23.22000