public void Save(IMainObject car) { if (car.GetType() == typeof(Car)) { SaveSystemLogic.SaveCar(JsonConvert.SerializeObject(car), car.Name); } }