C# 找出实现某个接口的所有类
该方法只能找实现某个接口的类,不能找继承某个抽象类的子类
var types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IOutputArray)))) .ToArray(); foreach (var v in types) { Console.WriteLine(v.FullName); }