Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# how to group console output into columns

/* 
The Second value (in this case, 10) determines the width of the column in spaces.
Positive values cause your input to be right aligned, negative values are left aligned.
*/

Console.WriteLine($"{customer[DisplayPos],10}" +
                  $"{salesFigures[DisplayPos],10}" +
                  $"{feePayable[DisplayPos],10}" +
                  $"{seventyPercentValue,10}" +
                  $"{thirtyPercentValue,10}");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #group #console #output #columns
ADD COMMENT
Topic
Name
1+4 =