Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // make those fields public for accessibility
- public string Username;
- public string Password;
- public string NAME;
- public string Age;
- public User(string Username, string Password, string NAME, string Age)
- {
- this.Username = Username;
- this.Password = Password;
- this.NAME = NAME;
- this.Age = Age;
- }
- public static void AddUserToList(User user)
- {
- UserList.Add(user);
- }
- {
- if (string.IsNullOrWhiteSpace(NTB.Text) && string.IsNullOrWhiteSpace(ATB.Text) && string.IsNullOrWhiteSpace(RegUserNameTB.Text) && string.IsNullOrWhiteSpace(RegPasswordTB.Text))
- {
- MessageBox.Show("Please enter the following:" + "n" + "Name" + "n" + "Age" + "n" + "n" + "UserName" + "n" + "Password");
- }
- else
- {
- User user = new User(RegUserNameTB.Text, RegPasswordTB.Text, NTB.Text, ATB.Text);
- User.AddUserToList(user);
- }
- Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement