int i; label1.Text =""; for (i = 0; i <=50; i++) { if (i % 2 != 0) label1.Text += i.ToString() + " "; }