initial
This commit is contained in:
@@ -41,18 +41,18 @@ namespace CarManagerV2
|
||||
return $"{make} {model} ({year})";
|
||||
}
|
||||
|
||||
public string toCsvString()
|
||||
public string ToCsvString()
|
||||
{
|
||||
return $"{id};{make};{model};{year};{color};{mileage};{price}";
|
||||
}
|
||||
|
||||
public static Car fromCsvString(string csv)
|
||||
public static Car FromCsvString(string csv)
|
||||
{
|
||||
string[] parts = csv.Split(';');
|
||||
return new Car(int.Parse(parts[0]), parts[1], parts[2], int.Parse(parts[3]), parts[4], int.Parse(parts[5]), decimal.Parse(parts[6]));
|
||||
}
|
||||
|
||||
public bool isChanged(Car other)
|
||||
public bool IsChanged(Car other)
|
||||
{
|
||||
return make != other.make || model != other.model || year != other.year || color != other.color || mileage != other.mileage || price != other.price;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user