Server.ServerSideMenu.IPoints_TextChanged C# (CSharp) Méthode

IPoints_TextChanged() private méthode

IPoints_TextChanged. This method is called when the user enters a number for the points. It checks to make sure that the value entered is in the correct format and throws an error if not. It modifies the pointsToWin.
private IPoints_TextChanged ( object sender, EventArgs e ) : void
sender object Object
e EventArgs Event
Résultat void
        private void IPoints_TextChanged(object sender, EventArgs e)
        {
            try
            {
                pointsToWin = Int32.Parse(IPoints.Text);
            }
            catch (FormatException ex)
            {
                this.Text = "Sorry you must enter a int number";
            }
        }