I'm trying to create a table with data using StringBuilders AppendFormat method. I want the text in the second and third column to be left aligned.
Here is an example I found on google: http://www.csharp-examples.net/align-string-with-spaces/
However, using the same code as the website I get different results. The placement of the second column text depends on the length of the first column text. Am I doing this wrong? Is there a better method that would be more suited for this task? I want a certain amount of space from the first character of the first column to the first character of the second column ( like the setw() method in c++)
symbolTableToString.AppendFormat(" {0,-20} {1,-10} {2,-10} {3,-10}",dataNode.token, dataNode.tokenClass, dataNode.tokenMode, dataNode.alias).AppendLine();
I'm putting each line into a text box and am unable to use a different widget as this is part of a homework assignment. 