string s = "cat".PadRight(8);
string s2 = "poodle".PadRight(8);
Console.Write(s);
Console.WriteLine("feline");
Console.Write(s2);
Console.WriteLine("canine");
Console.WriteLine();
for (int i = 0; i < 30; i += 8)
{
Console.Write(string.Format("{0} record(s) found.".PadRight(30, '.'), i));
Console.WriteLine("(DONE).");
}
Console.Read();
这给了我这个输出
为什么那些(DONE)
没有正确对齐feline and canine
?