摘要: 使用仿射添加实现了IEncryptAlgorithm接口的类,并实例化,添加到列表中。Assembly assembly = Assembly.GetExecutingAssembly(); //获取当前执行程序集Type[] types = assembly.GetTypes(); //获取程序集中的类foreach (Type type in types){ Type typeInterface = type.GetInterface("IEncryptAlgorithm"); //如果未实现接口,返回值为null if (t... 阅读全文
posted @ 2011-09-15 09:03 BlueGlass 阅读(301) 评论(0) 推荐(0) 编辑