原文:C#获取C# DLL中的指定接口的所有实现实例 - qq_19759475的博客 - CSDN博客
public static List<T> CreateTarInterface<T>(string dllpath)
{
List<T> rs = new List<T>();
var dlllll = Assembly.Load(dllpath);
foreach (var item in dlllll.GetTypes())
{
object objType = dlllll.CreateInstance(item.Namespace + "." + item.Name);
if (typeof(T).IsAssignableFrom(objType.GetType()))
rs.Add((T)objType);
}
return rs;
}