获取所有继承接口的类

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

 

posted @ 2018-01-24 13:22  以沫浅夏  阅读(630)  评论(0编辑  收藏  举报