Wednesday, March 26, 2008
Find the compatible types in an assembly:

public static Type[] FindCompatibleTypes(Assembly assembly, Type baseType)
{
List<Type> types = new List<Type>();

foreach (Type type in assembly.GetTypes())
{
if (type != baseType && baseType.IsAssignableFrom(type))
types.Add(type);
}

return types.ToArray();
}

Wednesday, March 26, 2008 8:43:39 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
Thursday, March 27, 2008 2:13:37 AM (Central Standard Time, UTC-06:00)
Why are you (almost) copying my blog entry from last year?

http://www.blog.activa.be/2007/07/17/FindAllCompatibleTypesInAnApplication.aspx

The method you post here is exactly the same as one of the utility methods in my utility library (even the variable names are exactly the same)
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):