Find all classes that inherit a certain class

Sometimes, it may be handy to retrieve all classes that inherit a certain class. This is not hard, but perhaps a bit obscure:

public static IEnumerable<Type> GetClasses(Type baseType)
{
    var assembly = Assembly.GetCallingAssembly();
    return assembly.GetTypes().Where(type => type.IsSubclassOf(baseType));
}

I hope this helps.