Q:

How to pad multiple strings when writing to console so that part is aligned left and part is aligned right?

I am trying to write lines one at a time to the console and to an output file. I am not able to figure out how to pad the string so that the left part of the string is aligned left and the right part is aligned right similarly between different WriteLines's and StreamWrite's. 
I've tried using the \t which works nicely if the left part of the string is similar in length to other strings, but fails if the strings are too different in length. 
{
sw.WriteLine($"{now} {typeOfTransaction} \t ${transacAmnt:0.00} ${currentbalance:0.00}");
}

Expected Output:
6/10/2019 4:15:44 PM Added Money         $10.00 $10.00
6/10/2019 4:15:53 PM Cloud Popcorn A4    $10.00 $6.35
6/10/2019 4:15:55 PM Cash Out            $6.35 $0.00

Actual Output:
6/10/2019 4:15:44 PM Added Money         $10.00 $10.00
6/10/2019 4:15:53 PM Cloud Popcorn A4    $10.00 $6.35
6/10/2019 4:15:55 PM Cash Out    $6.35 $0.00

A:

you can use String.Format + {index,length}
e.g:
Console.WriteLine(String.Format("{0,-10}  {1,-20}  ${2,-10} ${3,-10}", DateTime.Now, "Added Money", 10.00,10.00));
Console.WriteLine(String.Format("{0,-10}  {1,-20}  ${2,-10} ${3,-10}", DateTime.Now, "Cloud Popcorn A4", 10.00,6.35));
Console.WriteLine(String.Format("{0,-10}  {1,-20}  ${2,-10} ${3,-10}", DateTime.Now, "Cash Out", 6.35,0.00));

