public Vehicle() //- test av konstruktorer { VehicleType = FordonsTyper.Personbil; Color = "NoColor"; Weight = 0f; // default Length = 0f; // default }
public Vehicle(FordonsTyper fordonsTyp, string färg, float Weight, float Length) { VehicleType = fordonsTyp; Color = färg; this.Weight = Weight; this.Length = Length; System.Console.WriteLine("Vehicle av typen: {0} vilket väger: {1} kg med längden: {2} m", fordonsTyp, this.Weight, this.Length); }
public Vehicle(FordonsTyper fordonsTyp, string färg) { VehicleType = fordonsTyp; Color = färg; System.Console.WriteLine("Vehicle av typen: {0}", fordonsTyp); }