Exemplo n.º 1
0
 public Person(string name)
 {
     this.name = name;
     this.company = new Company();
     this.pokemons = new List<Pokemon>();
     this.parents = new List<Parent>();
     this.children = new List<Child>();
     this.car = new Car();
 }
Exemplo n.º 2
0
 // Sets Company or overrides it!
 public void SetCompany(string companyName, string department, string salary)
 {
     this.Company = new Company(companyName, department, salary);
 }
Exemplo n.º 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>();
 }