http://www.sqlservercentral.com/articles/Stairway+Series/87629/
Implement Factory pattern using generics public interface IDoWork { string DoWork(); } Declare an Interface first by abstracting the common functionality Here I am taking the example of DoWork public class Manager : IDoWork { public string DoWork() { return "Manager Manages School" ; } } Implement the IDoWork in concrete classes as shown public class Teacher : IDoWork { public string DoWork() { return "Teacher teaches student in school" ; ...
Comments
Post a Comment