What does Assembly.GetExportedTypes() do? How is it different from Assembly.GetTypes()
Can you explain with example?
Little remark about InternalsVisibleToAttribute
and this question.
Even if the call is made by an assembly with an InternalsVisibleTo
attribute, GetExportedTypes()
won't return internal
types.
So, GetExportedTypes()
returns only public
types.
GetExportedTypes() does not include protected/private/internal types. As per the question linked in Alexander's question below, internal types are not included even if would be visible to an assembly via InternalsVisibleToAttribute.
GetTypes() includes all types.
GetExportedTypes()
returns only types which are visible outside the assembly in question. "Visible" means public types and public types nested within other public types.