Guest User

Untitled

a guest
Mar 19th, 2020
522
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Guild
  6. {
  7. public class Player
  8. {
  9. public Player(string name, string classs)
  10. {
  11. this.Name = name;
  12. this.Classs = classs;
  13. this.Rank = "Trial";
  14. this.Description = "n/a";
  15. }
  16.  
  17. public string Name { get; private set; }
  18.  
  19. public string Classs { get; private set; }
  20.  
  21. public string Rank { get; set; }
  22.  
  23. public string Description { get; set; }
  24.  
  25. public override string ToString()
  26. {
  27. StringBuilder myStringToReturn = new StringBuilder();
  28. myStringToReturn.AppendLine($"Player {this.Name}: {this.Classs}");
  29. myStringToReturn.AppendLine($"Rank: {this.Rank}");
  30. myStringToReturn.AppendLine($"Description: {this.Description}");
  31. return myStringToReturn.ToString().TrimEnd();
  32. }
  33. }
  34. }
RAW Paste Data Copied