public class UnityTool<IClass,cbClass> where IClass, cbClass:class
{
public static void UnityTest()
{
IUnityContainer container = new UnityContainer();
container.RegisterType<IClass, cbClass>();
}
}
I'd like to create a common static method to implement the DI(Dependency Injection).
but vs2013 told me that my grammer is wrong.
how to solve it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…