I have two different queries for which I have
(535.00).ToString("C", CultureInfo.CreateSpecificCulture(Configuration.UICulture));
but what I want is if there is 0
after decimal I don't want to show decimal
digit and if there is something else for example 535.50
then only I want to show the decimal so for that I am out with the solution decimal.ToString("G29")
and now I am not able to do that since I am already using culture format for $
sign and the value is converted into string
.
So, I want to use both the formats in string.ToDecimal("G29")
and
string.ToString("C", CultureInfo.CreateSpecificCulture(Configuration.UICulture))
since I want the resultant value to be either 535$
or 535.50$
.
You can either suggest me how to use multiple decimal to string formatted or you can suggest me some better solution if you have. I will appreciate your answer.
Thanks