Async the content in textbox
<p>I want to display the content asynchronously in textbox? Do anyone know the bug of my code listed below? I want to implement the text in textbox will be updated per second with new value? also i want to ask why checking the InvokeRequired each time before calling the invoke method for the controller?</p>

<pre><code>        private void Counting(int Num)
    {

        int i = 0;
        string counter = null;
        while (i &lt; Num)
        {
            Thread.Sleep(1000);
            counter = string.Format(" {0}", i);
            tbxStatus.BeginInvoke(new UpdateStatusDelegate(UpdateStatus), new string[] { counter });
        }

    }

    public void UpdateStatus(string data)
    { 
        tbxStatus.Text += data;
    }

    public delegate void UpdateStatusDelegate(string data);

    public delegate void CountDelegate(int num);

    private void btnStart_Click(object sender, EventArgs e)
    {
        if (this.InvokeRequired)
        {
            this.Invoke(new CountDelegate(Counting), new object[] { 5 });
        }
        else
            Counting(5);
    }
</code></pre>

<p>Thanks</p>
