C# 获取指定接口的所有实现类

   var types = AppDomain.CurrentDomain.GetAssemblies()
 .SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(InterfaceName))))
 .ToArray();

 

posted @ 2016-04-08 17:44  b̶i̶n̶g̶.̶  阅读(821)  评论(0编辑  收藏  举报