for (int i= 1; i < 10; i++)
textBox1.Text+= i.ToString();
for (int i= textBox1.Text.Length; textBox1.Text.Length < 20; i++)
textBox1.Text+= i.ToString();
for (;textBox1.Text.Length < 40;)
textBox1.Text+= '#';
while (textBox1.Text.Length < 60)
textBox1.Text+= '$';
The textbox (started as ++) will contain ++1234567891112131415###################$$$$$$$$$$$$$$$$$$$$ (what else).
Thanks to Frans on do while.
Peter