Cool, thanks for the feedback! Final solution that supported by WPF:

Code:
int i = 1;
while (i < 6)
{
textBox1.AppendText(String.Format("current value of n is {0}{1}", i++, Environment.NewLine));
}