Answers for "c# how to group console output into columns"

C#
0

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}");
Posted by: Guest on August-31-2021

C# Answers by Framework

Browse Popular Code Answers by Language