Advertisement
deededaa

Untitled

Jul 20th, 2019
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. namespace Heroes
  2. {
  3. using System.Text;
  4.  
  5. public class Item
  6. {
  7. public Item(int strength, int ability, int intelligence)
  8. {
  9. this.Strength = strength;
  10. this.Ability = ability;
  11. this.Intelligence = intelligence;
  12. }
  13.  
  14. public int Strength { get; set; }
  15.  
  16. public int Ability { get; set; }
  17.  
  18. public int Intelligence { get; set; }
  19.  
  20. public override string ToString()
  21. {
  22. StringBuilder sb = new StringBuilder();
  23.  
  24. sb.AppendLine("Item:");
  25. sb.AppendLine($" * Strength: {Strength}");
  26. sb.AppendLine($" * Ability {Ability}");
  27. sb.Append($" * Intelligence {Intelligence}");
  28.  
  29. return sb.ToString();
  30. }
  31. }
  32. }
  33. namespace Heroes
  34. {
  35. using System.Text;
  36.  
  37. public class Item
  38. {
  39. public Item(int strength, int ability, int intelligence)
  40. {
  41. this.Strength = strength;
  42. this.Ability = ability;
  43. this.Intelligence = intelligence;
  44. }
  45.  
  46. public int Strength { get; set; }
  47.  
  48. public int Ability { get; set; }
  49.  
  50. public int Intelligence { get; set; }
  51.  
  52. public override string ToString()
  53. {
  54. StringBuilder sb = new StringBuilder();
  55.  
  56. sb.AppendLine("Item:");
  57. sb.AppendLine($" * Strength: {Strength}");
  58. sb.AppendLine($" * Ability {Ability}");
  59. sb.Append($" * Intelligence {Intelligence}");
  60.  
  61. return sb.ToString();
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement