static void Main(string[] args) { Gear gear1 = new Gear { GearName = " Catching Glowe ", Model = " PaskaRänsä3D ", Size = " 14'' ", Prize = " 3,50 e" }; Gear gear2 = new Gear { GearName = " Blocker ", Model = " PaskaKilpi4D ", Size = " 14'' ", Prize = " 2,5 e" }; Gear gear3 = new Gear { GearName = " Goalie Pads ", Model = " SohvatyynyPatjat ", Size = " 1/2 divaani ", Prize = " 5 e" }; Gear gear4 = new Gear { GearName = " Goalie Stick ", Model = " PieceOfWood ", Size = " 1/2 kuusi ", Prize = " 0 e" }; Gear gear5 = new Gear { GearName = " Player Stick ", Model = " TPS Louisville ", Size = " 150cm ", Prize = " kympillä Virtaselta" }; Gear gear6 = new Gear { GearName = " Player Glowes ", Model = " UunikinnasBurned ", Size = " OSFA ", Prize = " Prizelezzz" }; Player goalie = new Player { FirstName = "Harkkahallin", LastName = "Hasek ", Position = "Goalie" }; goalie.AddGear(gear1); goalie.AddGear(gear2); goalie.AddGear(gear3); goalie.AddGear(gear4); Player forward1 = new Player { FirstName = "Tuleva", LastName = "Tähti ", Position = "Leftwing" }; forward1.AddGear(gear5); forward1.AddGear(gear6); Console.WriteLine(goalie.ToString()); Console.WriteLine(forward1.ToString()); Console.WriteLine("Press any key..."); Console.ReadLine(); }
public void AddGear(Gear gear) { Gears.Add(gear); }