Nicholas Paldino [.NET/C# MVP] wrote:
Unfortunately no, there is no pre-set way of wrapping the text. You
will have to code this yourself. It shouldn't be too hard, since you know
you will always have 80 characters per line (as opposed to drawing on the
screen in non-fixed-width fonts).
Ah, but my standard cmd prompt isn't 80 chars in width. I changed it
because I wanted more than that. If you're using .NET 2, it's become
real easy to get to the information about the Console window using
properties like Console.WindowWidth. If you're not on .NET 2, you'd have
to use the Win API function GetConsoleScreenBufferInfo - a bit more
complicated and possibly not worth the effort.
I'd say it depends: If you only want to output some long text, it's
probably just as well if it doesn't use the whole width (but poor people
who set their window to only 70 chars...). If you're writing an
application that actually works on the console interactively, you might
want to go to the trouble to make it work perfectly.
Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619
http://www.sturmnet.org/blog