string value show always with 2 decimal places c# code example
Example 1: c# display float with 2 decimal places
myFloatVariable.ToString("0.00"); //2dp Number
myFloatVariable.ToString("n2"); // 2dp Number
myFloatVariable.ToString("c2"); // 2dp currency
Example 2: C# decimal with two places store as string with two places
public static string DoFormat( double myNumber )
{
var s = string.Format("{0:0.00}", myNumber);
return s;
}