SHARE
TWEET

Untitled

a guest Aug 12th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // make those fields public for accessibility
  2. public string Username;
  3. public string Password;
  4. public string NAME;
  5. public string Age;
  6.  
  7. public User(string Username, string Password, string NAME, string Age)
  8. {
  9.  
  10.     this.Username = Username;
  11.     this.Password = Password;
  12.     this.NAME = NAME;
  13.     this.Age = Age;
  14. }
  15.  
  16. public static void AddUserToList(User user)
  17. {
  18.     UserList.Add(user);
  19. }
  20.    
  21. {
  22.  
  23.  
  24.     if (string.IsNullOrWhiteSpace(NTB.Text) && string.IsNullOrWhiteSpace(ATB.Text) && string.IsNullOrWhiteSpace(RegUserNameTB.Text) && string.IsNullOrWhiteSpace(RegPasswordTB.Text))
  25.     {
  26.         MessageBox.Show("Please enter the following:" + "n" + "Name" + "n" + "Age" + "n" + "n" + "UserName" + "n" + "Password");
  27.     }
  28.     else
  29.     {
  30.         User user = new User(RegUserNameTB.Text, RegPasswordTB.Text, NTB.Text, ATB.Text);
  31.         User.AddUserToList(user);
  32.     }
  33.     Close();
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top