2015-04-08 57 views

回答

2

你可以從這樣的查詢靈感:

let listOfT = ThirdParty.Types.WithFullName(
"System.Collections.Generic.IList<T>").Single() 

let compatibleTypes = listOfT.TypesThatImplementMe.Concat(listOfT) 

from m in Methods.Where(m => m.ReturnType != null && compatibleTypes.Contains(m.ReturnType)) 
select new { m, m.ReturnType }