Software Development Network>> Visual C#>> How can I parse "101050" to currency
I have a string "101050" and I want to convert it to "$1,010.50"
how can I do that please!
double d = (Int32.Parse(str)) / 10.0;
Console.WriteLine(string.Format("{0:c}",d));
Jeremy,I guess you need "/100.0"
--mc
what I did was just adding them instead of converting 101050
string1 =
better than nothing, if you guys have any suggestions please let me know, I'm gonna bother with the comma
How can I parse "101050" to currency
pvulcan
Repi3
double d = (Int32.Parse(str)) / 10.0;
Console.WriteLine(string.Format("{0:c}",d));
PeterVrenken
Jeremy,
I guess you need "/100.0"
--mc
Vikasumit
Nep23
what I did was just adding them instead of converting 101050
string1 =
"$" +string1 .Insert(string1.Length - 2, "."); //$1010.50better than nothing, if you guys have any suggestions please let me know, I'm gonna bother with the comma