right justification of columns of numbers

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

sidbro

Thread Starter
Joined
Sep 12, 2003
Messages
7
How do I right justify number columns when printing in Visual Basic.Net??
 
Joined
Jul 29, 2004
Messages
6,650
Hi sidbro,

I can't remember the exact syntax in VB but in Java, I'll do this :

Example : I 'right justify' a number in a string which length = 15

int myNumber = 1;
String rightJustified = "" + myNumber;
while (rightJustified.length < 15) rightJustified = " " + rightJustified;
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top