I am trying to format a decimal so that it will get displayed as so:
14.5 should get displayed as \"14.50\" 14.50 should get displayed as \"14.50\" 14.05 should get
Follow Reed's answer and add a check after that:
resultArray = result.Split('.');
if (resultArray.Length > 1 && resultArray[1].Length != 2)
result = String.Format("{0.00}", value);
Not exactly elegant, but will get you the result you desire.
This is assuming the person saying it doesn't apply to 14.5 is correct in the comments.