Assembly.GetExportedTypes Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the types defined in this assembly that are visible outside the assembly.
Assembly: mscorlib (in mscorlib.dll)
Return Value
Type: System.Type []An array of Type objects that represent the types defined in this assembly that are visible outside the assembly.
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.
using System; using System.Reflection; public class Example { public static void Demo(System.Windows.Controls.TextBlock outputBlock) { foreach (Type t in Assembly.GetExecutingAssembly().GetExportedTypes()) { outputBlock.Text += t + "\n"; } } } public class PublicClass { public class PublicNestedClass { } protected class ProtectedNestedClass { } internal class FriendNestedClass { } private class PrivateNestedClass { } } internal class FriendClass { public class PublicNestedClass { } protected class ProtectedNestedClass { } internal class FriendNestedClass { } private class PrivateNestedClass { } }
Show: