.
, ( mscorlib, , string), , :
.Net 3.0
List<Type> implementors =
Assembly.GetAssembly(typeof(string))
.GetTypes()
.Where(type => type.GetInterfaces().Contains(typeof(IList)))
.ToList();
.Net 2.0
List<Type> implementors = new List<Type>();
foreach (Type type in Assembly.GetAssembly(typeof(string)).GetTypes())
{
foreach (Type interfaceType in type.GetInterfaces())
{
if (interfaceType == typeof(IList))
{
implementors.Add(type);
}
}
}
implementors Types, IList. IList , IDictionary, ICollection ..
Edit:
AppDomain, :
List<Type> implementors =
AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(assembly => assembly.GetTypes()
.Where(type => type.GetInterfaces().Contains(typeof(IList)))
).ToList();
, . , Reflector - , ( , ). , GAC ... , Reflector, , , .