By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,158 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,158 IT Pros & Developers. It's quick & easy.

formatting console app output

P: n/a
djc
before I dig into the visual studio docs looking for info on this I decided
to post here to hopefully get pointed in the right direction and maybe save
some some.

I am playing around with creating console programs. I want to create my own
tools and utilities, not full blown applications. However, even my small
tools may have a lot of output. I want to find out how I can format my
output nicely. For example, using nicely aligned columns.

The only thing that came to mind was just queuing all my output into one
string and adding tabs, spaces, etc... as I build the string and then just
make one call to console.writeline.

However, before I did that I wanted to check the huge collection of tools
available via the .net framework (1.1 and/or 2.0) to see what more
specialized classes may exist for this. Do any? Or do I just focus on the
string manipulating classes and do what I mentioned previously?

any input is appreciated. Thanks.
Apr 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"djc" <no***@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
before I dig into the visual studio docs looking for info on this I
decided to post here to hopefully get pointed in the right direction and
maybe save some some.

I am playing around with creating console programs. I want to create my
own tools and utilities, not full blown applications. However, even my
small tools may have a lot of output. I want to find out how I can format
my output nicely. For example, using nicely aligned columns.

The only thing that came to mind was just queuing all my output into one
string and adding tabs, spaces, etc... as I build the string and then just
make one call to console.writeline.

However, before I did that I wanted to check the huge collection of tools
available via the .net framework (1.1 and/or 2.0) to see what more
specialized classes may exist for this. Do any? Or do I just focus on the
string manipulating classes and do what I mentioned previously?

any input is appreciated. Thanks.


Take a look at Console.WriteLine overloads. Ex:

Console.WriteLine("Blah : {0,-30} Testing: {1}", "boo", "bee");

HTH :)

Mythran

Apr 4 '06 #2

P: n/a
djc
will do. Thanks.

"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...

"djc" <no***@nowhere.com> wrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
before I dig into the visual studio docs looking for info on this I
decided to post here to hopefully get pointed in the right direction and
maybe save some some.

I am playing around with creating console programs. I want to create my
own tools and utilities, not full blown applications. However, even my
small tools may have a lot of output. I want to find out how I can format
my output nicely. For example, using nicely aligned columns.

The only thing that came to mind was just queuing all my output into one
string and adding tabs, spaces, etc... as I build the string and then
just make one call to console.writeline.

However, before I did that I wanted to check the huge collection of tools
available via the .net framework (1.1 and/or 2.0) to see what more
specialized classes may exist for this. Do any? Or do I just focus on the
string manipulating classes and do what I mentioned previously?

any input is appreciated. Thanks.


Take a look at Console.WriteLine overloads. Ex:

Console.WriteLine("Blah : {0,-30} Testing: {1}", "boo", "bee");

HTH :)

Mythran

Apr 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.