Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   setw() in .NET (http://www.programmingforums.org/showthread.php?t=10670)

hbe02 Jul 9th, 2006 1:41 PM

setw() in .NET
 
what is the equivilent of this:
:

cout<<setw(2)<<dt.Second<<endl;
in the .NEt framework console which is as follows.
:

Console::WriteLine(dt.Second);

Thanks

kurifu Jul 9th, 2006 2:07 PM

Look up the formatting options available through the ToString() member of dt.second. I can not tell you off hand how to do it since I don't use the formatters too often, but there is a way, should be easily found in MSDN.

Ooble Jul 9th, 2006 5:42 PM

You can use String.Format to format a string. It's basically a hybrid of printf and Pascal's write function.

Clickify.


All times are GMT -5. The time now is 12:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC