Advertisement
Guest User

Untitled

a guest
Dec 31st, 2015
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.48 KB | None | 0 0
  1. public struct User
  2.         {
  3.             string Name;
  4.             string Surname;
  5.             string Login;
  6.             string Password;
  7.             string secretCode;
  8.  
  9.             public User(string Name, string Surname, string Login, string Password, string secretCode)
  10.             {
  11.                 this.Name = Name;
  12.                 this.Surname = Surname;
  13.                 this.Login = Login;
  14.                 this.Password = Password;
  15.                 this.secretCode = secretCode;
  16.                
  17.             }
  18.  
  19.            public static string nameReturn(User usrname)
  20.             {
  21.                 return usrname.Name;
  22.             }
  23.             public static string surnameReturn(User usrname)
  24.             {
  25.                 return usrname.Surname;
  26.             }
  27.             public static string loginReturn(User usrname)
  28.             {
  29.                 return usrname.Login;
  30.             }
  31.            
  32.             public static string passwordReturn(User usrname)
  33.             {
  34.                 return usrname.Password;
  35.             }
  36.             public bool Auth(string login, string password)
  37.             {
  38.                 if (this.Login == login && this.Password == password)
  39.                 {
  40.                     return true;
  41.                 }
  42.                 else return false;
  43.             }
  44.             public string secretcodeReturn()
  45.             {
  46.                 if (Auth(Login, Password))
  47.                 {
  48.  
  49.                 }
  50.             }
  51.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement