コード例 #1
0
ファイル: Vehicle.cs プロジェクト: pes1/Garage
 public Vehicle() //- test av konstruktorer
 {
     VehicleType = FordonsTyper.Personbil;
     Color       = "NoColor";
     Weight      = 0f;         // default
     Length      = 0f;         // default
 }
コード例 #2
0
ファイル: Vehicle.cs プロジェクト: pes1/Garage
 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);
 }
コード例 #3
0
ファイル: Vehicle.cs プロジェクト: pes1/Garage
 public Vehicle(FordonsTyper fordonsTyp, string färg)
 {
     VehicleType = fordonsTyp;
     Color       = färg;
     System.Console.WriteLine("Vehicle av typen: {0}", fordonsTyp);
 }