How to avoid/warn user for wrong entries in Windows Application
<p>How I can tell the user by showing a MSG box that what he enterd is not in the right format
I have textbox that i want to get only numbers and if the user entered letters instead to show him a msg</p>

<pre><code>int level;
        if(range.Text.GetType)
        {
            MessageBox.Show("Please Enter Only Number");
        }
        else
        {
        level = int.Parse(range.Text);
        // use the randomGenerator function according to the number i entered.
        TheRandNo = randomGenerator.Next(level);
        //Activate the guess button.
        GuessBT.Enabled = true;
        label4.Text = x.ToString();
        // To start the game with the green color
        BackColor = Color.Green;
        }
</code></pre>

<p>thanx in advance</p>
