R
Ralf Steinstraesser
Hi,
I am looking into formatting a double as as string. My starting point
therefor are the various capabilities of Excel to format numerical values.
One of the really nice things about formatting values in Excel the
possibility of aligning numbers in columns. If you use "_($.00_);($.00)" as a
custom format string, positive and negative values would perfectly align.
($2.50)
$2.50
Is there any formatting mechanism in the .NET framework which allows
vertical alignment of this example. I have tried with String.Format,
double.ToString using custom format strings and NumberFormatInfo, but didn't
get the result I wanted. This occurs when using fonts, which do not have
equally spaced characters.
Thanks for any advice.
I am looking into formatting a double as as string. My starting point
therefor are the various capabilities of Excel to format numerical values.
One of the really nice things about formatting values in Excel the
possibility of aligning numbers in columns. If you use "_($.00_);($.00)" as a
custom format string, positive and negative values would perfectly align.
($2.50)
$2.50
Is there any formatting mechanism in the .NET framework which allows
vertical alignment of this example. I have tried with String.Format,
double.ToString using custom format strings and NumberFormatInfo, but didn't
get the result I wanted. This occurs when using fonts, which do not have
equally spaced characters.
Thanks for any advice.