Ejemplo n.º 1
0
        public static void SetHaveHazardousMaterials(Vehicles io_Vehicle)
        {
            bool haveHazardousMaterials;

            System.Type  vehicleType  = io_Vehicle.GetType();
            PropertyInfo propertyInfo = vehicleType.GetProperty("HaveHazardousMaterials");

            if (propertyInfo != null)
            {
                haveHazardousMaterials = GarageUI.GetHaveHazardousMaterials();
                propertyInfo.SetValue(io_Vehicle, haveHazardousMaterials, null);
            }
        }