Advertisement
didito33

User

Mar 11th, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public class User
  2. {
  3. public User(string username, string password, int facNumber, int role, DateTime validUntil)
  4. {
  5. Username = username;
  6. Password = password;
  7. FacNumber = facNumber;
  8. Role = role;
  9. ValidUntil = validUntil;
  10. }
  11.  
  12. public string Username { get; set; }
  13. public string Password { get; set; }
  14. public int FacNumber { get; set; }
  15. public int Role { get; set; }
  16. public DateTime ValidUntil { get; set; }
  17. public override string ToString()
  18. {
  19. return $"{this.Username} has a password: {this.Password}. The person has fac number: {this.FacNumber}. Their role is {this.Role}.Is valid until {this.ValidUntil.Year}th year.";
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement