String Format Help

  • Thread starter Thread starter jp2msft
  • Start date Start date
J

jp2msft

I can't remember how to do this, and I can't find it.

If I want to print X number of asterisks using string.Format, how would I do
it?

All the documentation seems to be focused on other formatting styles.

I'm creating a text style histogram:

A: xx
B: xxxxx
C: xxxxxxx
D: xxx

Thanks,
Joe
 
I can't remember how to do this, and I can't find it.

If I want to print X number of asterisks using string.Format, how would Ido
it?

All the documentation seems to be focused on other formatting styles.

I'm creating a text style histogram:

A: xx
B: xxxxx
C: xxxxxxx
D: xxx

Thanks,
Joe

I do not remember if you can have an option in the formatting string
for number of places (and the char to use). You could create a string
with the desired length using the constructor overload that takes the
length & the char to use.
 
Mark Rae said:
Chill out, Pete, my newsreader placed my reply under yours instead of the
OP - anyone with half an eye can see that...

You'll live...

Personally I that Pete has a valid point.
Your post was very misleading.

Would it have killed you to say you were sorry

Bill
 
Personally I that Pete has a valid point.
Your post was very misleading.

I disagree on both points.

It was completely obvious that Mark was replying to the original post, not
to Pete. Pete's reaction to Mark's post was way over the top, almost
bordering on the paranoid, and not for the first time!

Mark's post simply told the OP that a simple Google search would have
answered his question. How can you possibly consider that to be very
misleading?
 
Mark Rae said:
Sorry for what, exactly...?

-----
Peter Wrote:
I can't remember how to do this, and I can't find it.

If I want to print X number of asterisks using string.Format, how would
I do it?

By passing as an argument a string composed of the number of asterisks
you
want. Use the String class constructor that allows you to specify the
character to repeat and the length of the string.

-----
You wrote

GIYF:
http://www.google.co.uk/search?aq=f&sourceid=chrome&ie=UTF-8&q="C%23"+string+repeat

----
You snipped out what Peter wrote and left what the OP wrote
Looking at your post in isolation it certainly implies that Peter can't
remember .

Perhaps you are reading this in a newsreader that maintains the whole
thread.
I hide read messages and thus I saw the post in isolation.

Also, I though Peter was quite polite in asking you to be more careful with
your quotes.
You responded as though he had attacked you.

Bill
 
Back
Top