tags:

views:

264

answers:

2

What does Assembly.GetExportedTypes() do? How is it different from Assembly.GetTypes()

Can you explain with example?

+2  A: 

GetExportedTypes() returns only types which are visible outside the assembly in question. "Visible" means public types and public types nested within other public types.

Anton Gogolev
so you mean all public type are returned when GetExportedTypes() is used? What does GetTypes() do then?
Viks
+3  A: 

GetExportedTypes() does not include protected/private types. It's unclear from the documentation whether it includes internal types (as they could be visible to an assembly via InternalsVisibleToAttribute).

GetTypes() includes all types.

Richard Szalay