ModuleBuilder.GetTypes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns all the classes defined within this module.
public:
override cli::array <Type ^> ^ GetTypes();
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types might be removed")]
public override Type[] GetTypes();
public override Type[] GetTypes();
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types might be removed")>]
override this.GetTypes : unit -> Type[]
override this.GetTypes : unit -> Type[]
Public Overrides Function GetTypes () As Type()
Returns
An array that contains the types defined within the module that is reflected by this instance.
- Attributes
Exceptions
One or more classes in a module could not be loaded.
The caller does not have the required permission.
Remarks
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.