Ejemplo n.º 1
0
 public void Init()
 {
     // Now I dont need to pass this
     empEstate = this.CreateBuilding <EmpEstate>();
     setSomeProperty(empEstate);
     // now any one cannot create building in new your and
     // say it belongs to Philedelphia :)
     nyTimes = this.CreateBuilding <NYTimes>();
 }
Ejemplo n.º 2
0
 public void Init()
 {
     // Now I dont need to pass this and no one can create a building in new york
     // and say I making it for NJ :)
     empEstate = this.CreateBuilding <EmpEstate>();
     setSomeProperty(empEstate);
     // any one can create new object of some other city
     // and pass to the building
     empEstate = this.CreateBuilding <NYTimes>();
 }