1: 2: 3: 4:
int FieldLength = 20; string s = "123456789"; string format = "{0, -" + FieldLength + "}"; Console.WriteLine(String.Format(format, s));