Teo_Yanchev

DefiningClasses

Jan 8th, 2021
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. public Car(string make, string model, int year)
  2. {
  3.     this.Make = make;
  4.     this.Model = model;
  5.     this.Year = year;
  6. }
  7.  
  8.     public Car(string make, string model, int year,
  9.     double fuelQuantity, double fuelConsumption) : this(make, model, year)
  10. {
  11.     this.FuelQuantity = fuelQuantity;
  12.     this.FuelConsumption = fuelConsumption;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment