ADDemo.main.userPassword2_TextChanged C# (CSharp) Метод

userPassword2_TextChanged() приватный Метод

Handle when the userPassword2 box is changed
private userPassword2_TextChanged ( object sender, EventArgs e ) : void
sender object object from which the event was sent
e EventArgs Arguments to the event
Результат void
        private void userPassword2_TextChanged(object sender, EventArgs e)
        {
            //If the text is not empty, and it's the same as userPassword1
            if (userPassword2.Text.Length > 0 && userPassword1.Text == userPassword2.Text)
            {
                //Update the object's password field
                currentUser.Password = userPassword1.Text;

                //Reset bindings to update controls
                userBinding.ResetBindings(false);
            }
        }