2010-09-18 42 views

回答

2

喜欢的东西(我不是在PC)

from asm in AppDomain.CurrentDomain.GetAssemblies() 
from type in asm.GetTypes() 
where (type.IsClass || type.IsStruct) 
    && type.GetInterfaces().Any(
    intf => intf.IsGenericType 
    && intf.GetGenericTypeDefinition() == typeof(ISomeInterface<>)) 
select type; 
相关问题