Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Re: C# format Specifiers Help. (http://www.velocityreviews.com/forums/t314859-re-c-format-specifiers-help.html)

Jeff 08-21-2003 01:44 AM

Re: C# format Specifiers Help.
 

"Kevin" <kevine@digimindz.com> wrote in message
news:13852978.0308201635.1a3e42dd@posting.google.c 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:D5}", 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




All times are GMT. The time now is 04:16 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.