Design Pattern in .NET 101 – Abstract Factory Pattern (Creational Pattern) »
By admin on Feb 15, 2008 in .NET, Creational, design pattern | Comments Off on Design Pattern in .NET 101 – Abstract Factory Pattern (Creational Pattern)
Download Sample Code Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. E.g. I have a DocumentFactory class that either returns DefaultDocumentFactory or CustomDocumentFactory dependening on the environment variable. using System; using System.Collections.Generic; using System.Text; namespace AbstractFactory { abstract class DocumentFactory { public static DocumentFactory […]