(copied from my comment)
If you already have a string variable, let's call it s
, saying:
string.Format( /* something with s in it */ )
will not change s
itself. You might want to reassign, as in
s = string.Format( /* something with s in it */ )
where on the right-hand side the "old" s
object is used, and the result of Format
is then "saved" to s
and becomes the new s
.
But note that String.Format
cannot format a string as currency. It can format a number (like a decimal
or a double
) as a currency, but once you have string, no format like {0:C}
or {0:C0}
will help change the string output.