public void addCarInstance() { Cars carA = new Cars(); Console.WriteLine("**** Cars ****"); Console.WriteLine("Write Model: "); carA.model = Console.ReadLine(); Console.WriteLine("Write Make: "); carA.make = Console.ReadLine(); Console.WriteLine("Write year: "); carA.year = int.Parse(Console.ReadLine()); Console.WriteLine("Find user on id: "); int findPersonId = int.Parse(Console.ReadLine()); personList.Find(x => x.id.Equals(findPersonId)).AddCar(carA); }
public void AddCar(Cars car) { carList.Add(car); }