Advertisement
svetlyoek

Untitled

Jun 17th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. namespace HealthyHeaven
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6.  
  7. public class Vegetable
  8. {
  9. public string Name { get; set; }
  10.  
  11. public int Calories { get; set; }
  12.  
  13. public Vegetable(string name,int calories)
  14. {
  15. this.Name = name;
  16. this.Calories = calories;
  17. }
  18.  
  19. public override string ToString()
  20. {
  21. return $" - {this.Name} have {this.Calories} calories";
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement