Open shifasks opened 2 years ago
I padded each "column" to a fixed with with PadRight() for the first two, and then PadLeft() for the last column to make it right aligned. You have to make sure all of your Pad functions add up to the number of characters per line. For example:
string row = sku.PadRight(9) + " " + description.PadRight(28) + " " + price.PadLeft(9)
This would equal 48 character width.
It is also worth truncating each column to the maximum characters for each column too as the Pad functions will not trim characters off the end for you.
How to acheive like this.. https://user-images.githubusercontent.com/1809727/28242377-acfeb5de-69c7-11e7-802d-aab5f9d176bf.JPG
means...row wise printing with left ,center and right alighnment