Formatting numbers right-justified

  • Thread starter Thread starter Julian Nicholls
  • Start date Start date
J

Julian Nicholls

Hello Everybody

Am I missing something, or is there no way to format numbers right-justified
using Console.WriteLine(), i.e.

23
223
1023

I can get zero fill on the left, but not space fill.

Best Regards
Julian N.
 
In the great tradition of people answering their own questions...

I have finally found the alignment argument in format specifiers, the fifth
or sixth time that I read the formatting sections in MSDN.

All the Best
Julian N.
 
Julian said:
In the great tradition of people answering their own questions...

I have finally found the alignment argument in format specifiers, the fifth
or sixth time that I read the formatting sections in MSDN.

All the Best
Julian N.

..Net string formatting documentation has got to be the mostdifficult to
find/follow documentation there is...
 
Julie said:
.Net string formatting documentation has got to be the mostdifficult to
find/follow documentation there is..

Yes, I think it must. It's not as if I'm a beginner, either at programming,
or using MSDN :-)

I've been using MSDN in anger for 7 years, and programming in various
languages for more than 10 years before that.

Best Regards
Julian N.
 
Back
Top