Peter's Gekko

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
for a while

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

 

 


Posted 02-19-2004 6:55 PM by pvanooijen

[Advertisement]

Add a Comment

(required)  
(optional)
(required)  
Remember Me?