What do I use for the format number function to show a - for negative numbers instead of ()?
.net has built in number formatting features, including specifying the negative number formatting.
This is a starting point:
This MSDN article has a code snippet showing how you can do it:
Important bits are:
// Creates a new NumberFormatinfo. NumberFormatInfo myNfi = new NumberFormatInfo(); myNfi.NumberNegativePattern = 1; // Takes a negative value. Int64 myInt = -1234; Console.WriteLine( myInt.ToString( "N", myNfi ) );
You set the value of the optional parameter UseParensForNegativeNumbers to TriState.False
FormatNumber(-42, , , TriState.False)
http://msdn.microsoft.com/en-us/library/xfta99yt%28v=VS.90%29.aspx