String.Format(“{0:C2}”, -1234) (Currency format) treats negative numbers as positive
问题 I am using String.Format("{0:C2}", -1234) to format numbers. It always formats the amount to a positive number, while I want it to become $ - 1234 回答1: Am I right in saying it's putting it in brackets, i.e. it's formatting it as ($1,234.00) ? If so, I believe that's the intended behaviour for the US. However, you can create your own NumberFormatInfo which doesn't behave this way. Take an existing NumberFormatInfo which is "mostly right", call Clone() to make a mutable copy, and then set the