I think your problem is when displaying the decimal, not the contents of it.
If you try
string value = "1200.00";
decimal d = decimal.Parse(s);
string s = d.ToString();
s
will contain the string "1200"
.
However if you change your code to this
string value = "1200.00";
decimal d = decimal.Parse(s);
string s = d.ToString("0.00");
s
will contain the string "1200.00"
as you want it to do.
EDIT
Seems I'm braindead early in the morning today. I added the Parse
statements now. However even my first code will output "1200.00", even if I expected it to output "1200". Seems like I'm learning something each day, and in this case obviously something that is quite basic.
So disregard this a an proper answer. We will probably need more code to identify your problem in this case.