ModuleBuilder::GetTypes Method ()
Returns all the classes defined within this module.
Assembly: mscorlib (in mscorlib.dll)
Return Value
Type: array<System::Type^>^An array that contains the types defined within the module that is reflected by this instance.
| Exception | Condition |
|---|---|
| ReflectionTypeLoadException | One or more classes in a module could not be loaded. |
| SecurityException | The caller does not have the required permission. |
ReflectionTypeLoadException is a special class load exception. The ReflectionTypeLoadException.Types property contains the array of classes that were defined in the module and loaded. This array can contain some null values. The ReflectionTypeLoadException.LoaderExceptions property is an array of exceptions that represent the exceptions that were thrown by the class loader. The holes in the class array line up with the exceptions.
For example, if the class initializers of one of the classes throws an exception while it is being loaded, a TargetInvocationException is stored in the corresponding element of the LoaderExceptions array.
Note |
|---|
Starting with the .NET Framework 2.0 Service Pack 1, this member no longer requires ReflectionPermission with the ReflectionPermissionFlag::ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the .NET Framework 3.5 or later. |
Available since 1.1
Silverlight
Available since 2.0
