As per the title. I\'d like a list of all the inner classes of a given class, it can be a list of names or a list of types - I am not fussed. Is this possible? I thought the
Doesn't Type.GetNestedTypes do what you want?
Note that if you want to get "double-nested" types, you'll need to recurse - as Foo.Bar.Baz is a nested type in Foo.Bar, not in Foo.
For "modern" environments (.NET 4.5, PCLs, UWA etc) you need TypeInfo.DeclaredNestedTypes instead, e.g. type.GetTypeInfo().DeclaredNestedTypes
, using the GetTypeInfo() extension method.