fix: ordering with search v0

This commit is contained in:
Frozd
2025-11-28 12:37:22 +01:00
parent d4f3ac8776
commit 0c8b10cfe6
2 changed files with 17 additions and 4 deletions

View File

@@ -15,8 +15,9 @@ namespace CarManagerV2
string color;
int mileage;
decimal price;
int order;
public Car(int id, string make, string model, int year, string color, int mileage, decimal price)
public Car(int id, string make, string model, int year, string color, int mileage, decimal price, int order = 0)
{
this.id = id;
this.make = make;
@@ -25,6 +26,7 @@ namespace CarManagerV2
this.color = color;
this.mileage = mileage;
this.price = price;
this.order = order;
}
public int Id { get { return id; } set { id = value; } }
@@ -34,6 +36,7 @@ namespace CarManagerV2
public string Color { get { return color; } set { color = value; } }
public int Mileage { get { return mileage; } set { mileage = value; } }
public decimal Price { get { return price; } set { price = value; } }
public int Order { get { return order; } set { order = value; } }
public override string ToString()