Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Align sub-strings within a string using String.Format

Status
Not open for further replies.

T0AD

Programmer
Jun 4, 2003
73
GB
Code:
myString = String.Format("{0, 35}, {1, 10}, {2, 10}", myTxt1, myTxt2, myTxt3)

The above code seems to centre the text variables within the space I've allocated. Does anyone know how to align them? ie. so the result of a few iterations of the above could be something like:

John 23 Red Street
Christopher 19 Green Street
Tim 100 Blue Road

Thanks for your help.


There's a thin line between genius, and insanity!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top