C#, Factory Pattern