转载:
https://blog.csdn.net/dianque7027/article/details/102066782
实现:https://download.csdn.net/download/weixin_42401291/14074553
以及App.config的使用,读取xml文件进行解析
同理可以实例化接口
static void Main(string[] args)
{
//一般的创建对象
// User user = new User();
//使用IoC容器获取对象
var container = IoCContainer.GetContainer();
IUse userIoC = container["UserEntityOne"] as IUse;
//测试方法
userIoC.SayHello();
Console.ReadKey();
}