public static void RegisterForm <TInterface, TImplementation>() where TImplementation : BaseForm, TInterface { MyContainer.RegisterType <TInterface, TImplementation>(); }