예제 #1
0
파일: Person.cs 프로젝트: hammer4/SoftUni
 public Person(string name)
 {
     this.name = name;
     this.car = null;
     this.pokemons = new List<Pokemon>();
     this.parents = new List<Parent>();
     this.children = new List<Child>();
 }
예제 #2
0
 // Sets Car or overrides it!
 public void SetCar(string model, string speed)
 {
     this.Car = new Car(model, speed);
 }
예제 #3
0
 public Person(string name)
 {
     // === Single
     this.Name = name;
     this.Company = null;
     this.Car = null;
     // === Multiple
     this.Parents = new List<Parent>();
     this.Pokemons = new List<Pokemon>();
     this.Children = new List<Child>();
 }