找出实现了IForm的所有实现类
public interface IForm
{
}
方法一:
var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IForm))))
.ToArray();
Assembly assembly = Assembly.LoadFile(Application.StartupPath + "\\MyResourceWrite.exe");
var v = assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IForm)))
.ToArray();