public Vehicle(string _name, string _color)
 {
     name            = _name;
     color           = _color;
     this.vehType    = VehType.Car;
     this.NoOfWheels = 4;
     this.fuelType   = FuelType.Petrol;
 }
 public Vehicle(string name, string color, VehType veh, int noOfWheels)
 {
     this.Name      = name;
     this.Color     = color;
     this.NoOfWheel = noOfWheels;
     this.VehTypes  = veh;
     this.FuelTypes = FuelType.petrol;
 }
 public Vehicle(string _name, string _color, VehType _vehtype, int _NoofWheels)
 {
     name          = _name;
     color         = _color;
     vehType       = _vehtype;
     NoOfWheels    = _NoofWheels;
     this.fuelType = FuelType.Petrol;
 }
示例#4
0
 public Vehicle(string _name, string _color, VehType _vehicleType, int _noOfWheels)
 {
     name             = _name;
     color            = _color;
     this.vehicleType = _vehicleType;
     noOfWheels       = _noOfWheels;
     //FuelType.Petrol;
 }
 public Vehicle(VehType _vehtype, FuelType _fueltype, string _name, string _color, int _NoofWheels, string _make)
 {
     vehType    = _vehtype;
     fuelType   = _fueltype;
     name       = _name;
     color      = _color;
     NoOfWheels = _NoofWheels;
     make       = _make;
 }
示例#6
0
 public Vehicle(string _name, string _color, int _noOfWheels, string _make, VehType _vehicleType, FuelType _fuel)
 {
     name             = _name;
     color            = _color;
     noOfWheels       = _noOfWheels;
     make             = _make;
     this.vehicleType = _vehicleType;
     this.fuel        = _fuel;
 }
 public void Stop(VehType vehicletype)
 {
     Console.WriteLine(vehicletype + "has stopped");
 }
 public void Start(VehType vehicletype)
 {
     Console.WriteLine(vehicletype + " has started");
 }
示例#9
0
        public static VehicInfo VehHistory(VehCate cate, VehMake make, [Optional] string model, [Optional] VehType ctype, [Optional] string color)
        {
            var vehistory = new VehicInfo
            {
                VehCategs = cate,
                Make      = make,
                Model     = model,
                Cselect   = color
            };

            vInvent.Add(vehistory);
            return(vehistory);
        }