I want to print many line. Each line is a string plus white spaces plus a second string.
I want the second part string in each line aligning. So I use PadRight; but it is not working well.
Code:
void Main()
{
var str ="Hellooooo".PadRight(50)+"Test";
str += (Environment.NewLine+"World").PadRight(50)+"Test";
str+= (Environment.NewLine+"Hello Worldoooooooo").PadRight(50)+"Test";
Console.WriteLine(str);
}
You can see the three "Test" are not aligning vertically.