Export (0) Print
Expand All

Module.GetTypes Method

Returns all the classes defined within this module.

[Visual Basic]
Public Overridable Function GetTypes() As Type()
[C#]
public virtual Type[] GetTypes();
[C++]
public: virtual Type* GetTypes() [];
[JScript]
public function GetTypes() : Type[];

Return Value

An array of type Type containing classes defined within the module that is reflected by this instance.

Exceptions

Exception Type Condition
ReflectionTypeLoadException One or more classes in a module could not be loaded.
SecurityException 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 were loaded. This array may 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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

.NET Framework Security: 

See Also

Module Class | Module Members | System.Reflection Namespace | ReflectionTypeLoadException

Show:
© 2014 Microsoft