Reputation: 71
How can i format the StringBuilder for the output below to be aligned in a manner that it's properly padded, Right now it's just a mess!.I am using String Builder to make string in a manner :Stra.append(),Stra.append(" ")
Upvotes: 0
Views: 4228
Reputation: 559
You could use stringBuilder.AppendFormat("{0,16}", number)
. This will make your number right-aligned with a width of 16.
Upvotes: 1
Reputation: 578
you should be able to use vbtab to insert tabs or vbcrlf to insert a carriage return/line feed ie
Stra.append(vbTab)
Stra.append(VbCrLf)
Upvotes: 0