Advertisement
Guest User

Car.cs

a guest
Aug 16th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Parking
  6. {
  7. public class Car
  8. {
  9. public string Manufacturer { get; set; }
  10. public string Model { get; set; }
  11.  
  12. public int Year { get; set; }
  13.  
  14. public Car(string Manufacturer,string Model , int Year)
  15. {
  16. this.Manufacturer = Manufacturer;
  17. this.Model = Model;
  18. this.Year = Year;
  19.  
  20. }
  21.  
  22. public override string ToString()
  23. {
  24. return $"{Manufacturer} {Model} ({Year})";
  25. }
  26. }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement