Assembly.GetExportedTypes Method ()
.NET Framework (current version)
Gets the public types defined in this assembly that are visible outside the assembly.
Assembly: mscorlib (in mscorlib.dll)
Return Value
Type: System.Type()An array that represents the types defined in this assembly that are visible outside the assembly.
Implements
_Assembly.GetExportedTypes()| Exception | Condition |
|---|---|
| NotSupportedException | The assembly is a dynamic assembly. |
The only types visible outside an assembly are public types and public types nested within other public types.
The following code sample defines a number of classes with various access levels, and calls GetExportedTypes to display the ones that are visible from outside the assembly.
Imports System Imports System.Reflection Public Class Example Public Shared Sub Main() For Each t As Type In GetType(Example).Assembly.GetExportedTypes() Console.WriteLine(t) Next End Sub End Class Public Class PublicClass Public Class PublicNestedClass End Class Protected Class ProtectedNestedClass End Class Friend Class FriendNestedClass End Class Private Class PrivateNestedClass End Class End Class Friend Class FriendClass Public Class PublicNestedClass End Class Protected Class ProtectedNestedClass End Class Friend Class FriendNestedClass End Class Private Class PrivateNestedClass End Class End Class
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: