You can use a LINQ statement. I'm not 100% sure what you're trying to do, but you can do something like this.
Assembly.GetTypes().Where(type => type.IsSubclassOf(SomeType) && type.Whatever);
Edit
If the normal Assembly.GetTypes()
isn't returning your nested class, you could iterate over the array and add everything you find in CurrentType.GetNestedTypes()
to the array. like
var allTypes = new List<Type>();
var types = Assembly.GetTypes();
allTypes.AddRange(types);
foreach(var type in types)
{
allTypes.AddRange(type.GetNestedTypes());
}