public void SetAccessory(EAccessoriesType type, string name, int price) { List <string> result = null; switch (type) { case EAccessoriesType.AccesType: result = AccesTypeAccessories; break; case EAccessoriesType.AmbianceType: result = AmbienceTypeAccessories; break; case EAccessoriesType.LaureateType: result = LaureateTypeAccessories; break; default: break; } result.Add(name); Price += price; }
public void SetAccessory(EAccessoriesType type, string name, int price) { Car.SetAccessory(type, name, price); }