Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: C# format Specifiers Help.

Reply
Thread Tools

Re: C# format Specifiers Help.

 
 
Jeff
Guest
Posts: n/a
 
      08-21-2003

"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("{05}", 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with org.apache.log4j.PatternLayout format specifiers? Pep Java 0 10-11-2005 09:45 AM
understanding format specifiers siliconwafer C Programming 5 08-31-2005 09:48 PM
Writing arguments under format specifiers Peter Ammon C Programming 4 07-06-2004 03:41 PM
Re: C# format Specifiers Help. Martin Ambuhl C Programming 4 08-22-2003 01:57 AM
Re: C# format Specifiers Help. Ben Pfaff C Programming 0 08-21-2003 12:46 AM



Advertisments