static void Main(string[] args) { //injecting dependency outside the notofication class var notObj = new Notification(new Mobile()); notObj.mail = new Mail(); notObj.method(new Letter()); notObj.SendNotifications(); }
static void Main(string[] args) { //injecting dependency outside the notofication class var notObj = new Notification(new Mobile()); notObj.mail = new Mail(); notObj.method(new Letter()); notObj.SendNotifications(); }