I guess you could use the PadLeft and PadRight functions of string.
So in your code you could do something like:
I'm sure it could be done more elegantly, but it is almost 2.30am and I'm sleepyCode:Output.Text += "G " + (curgen + 1).ToString().PadLeft(10) + "\t\t" + total[curgen, 0].ToString().PadLeft(10) +"\t\t" + total[curgen, 1].ToString().PadLeft(10) + "\t\t" + total[curgen, 2].ToString().PadLeft(10) + "\t\t" + total[curgen, 3].ToString().PadLeft(10) + "\r\n";![]()




Reply With Quote