public void Modern(Double NewWeight, Int32 NewPower, Int32 NewResurs)// модернизация { dvs.Weight = NewWeight; dvs.Power = NewPower; dvs.Resurs = NewResurs; dvs.Remont(); }
public void Modern(Double NewWeight, Int32 NewPower, Int32 NewResurs)// модернизация { if (NewWeight < 0 || NewWeight > 15000 || NewPower < 0 || NewPower > 15000 || NewResurs < 0 || NewResurs > 1000000) { ex = new Exception("некорректные данные модернизации"); } dvs.Weight = NewWeight; dvs.Power = NewPower; dvs.Resurs = NewResurs; dvs.Remont(); }