Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // このクラスをシリアル化可能に
  2. [Serializable]
  3. public class SelectedItem
  4. {
  5. public int Id { set; get; }
  6. public string Name { set; get; }
  7. public int Price { set; get; }
  8. public int Quantity { set; get; }
  9.  
  10. public SelectedItem(int id, string name, int price, int quantity)
  11. {
  12. this.Id = id;
  13. this.Name = name;
  14. this.Price = price;
  15. this.Quantity = quantity;
  16. }
  17.  
  18. public override string ToString()
  19. {
  20. return "[" + Id + "]" + Name + "(" + Price + "円) " + Quantity + "個";
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement