I need to convert decimal to string, in this rulers:
120.00 - \"120\"
120.01 - \"120.01\"
120.50 - \"120.50\"
You can use the decimal.ToString override to specify a formatting.
decimal amount = 120.00m;
string str = amount.ToString("0.00");
This can also be used when using String.Format.
Console.WriteLine("{0:0.00}", amount);
In the case of your first rule, it cannot be done on one line.
decimal amount = 120.00m;
string str = amount.ToString("0.00").Replace(".00", String.Empty);