"Kevin" <> wrote in message
news: om...
> I am looking for a way in C# to format my output. I want to be able
> to specify a disply width and then have the variable printed at
> minimum with that width.
>
> I can accomplish this is C and C++ as follows:
>
> C - printf("%5d", someInt);
>
> C++ cout << setw(5) << someInt;
>
> What is the C# equivalent? I have been trying:
>
> Console.Write("{0
5}", someInt); - This however has leading zeros
> placed in it.
>
> Thanks for your Help.
C# is off-topic here. We only talk about ANSI C.
>
> Kevin
--
Jeff