A generic helper factory for .NET