private static void DodajNarzedzie(Magazyn m) { Console.WriteLine("Podaj numer seryjny: "); int NrSeryjny = Int32.Parse(Console.ReadLine()); Console.WriteLine("Podaj nazwę: "); string Nazwa = Console.ReadLine(); Console.WriteLine("Podaj cenę: "); decimal Cena = Decimal.Parse(Console.ReadLine()); Console.WriteLine("Podaj opis: "); string Opis = Console.ReadLine(); Narzedzie n = new Narzedzie(NrSeryjny, Nazwa, Cena, Opis); m.Dodaj(n); }
public void Dodaj(Narzedzie n) { this.ListaNarzedzi.Add(n); LiczbaNarzedzi++; }