Module.GetTypes Метод
Определение
Возвращает все типы, определенные в этом модуле.Returns all the types defined within this module.
public:
virtual cli::array <Type ^> ^ GetTypes();
public virtual Type[] GetTypes ();
abstract member GetTypes : unit -> Type[]
override this.GetTypes : unit -> Type[]
Public Overridable Function GetTypes () As Type()
Возвращаемое значение
- Type[]
Массив типа Type
, содержащий типы, определенные в модуле, отраженном этим экземпляром.An array of type Type
containing types defined within the module that is reflected by this instance.
Исключения
Невозможно загрузить один или несколько классов в модуле.One or more classes in a module could not be loaded.
У вызывающего объекта отсутствует необходимое разрешение.The caller does not have the required permission.
Комментарии
ReflectionTypeLoadException
— Это специальное исключение, связанное с загрузкой.ReflectionTypeLoadException
is a special load exception. ReflectionTypeLoadException.Types
Свойство содержит массив типов, которые были определены в модуле и были загружены.The ReflectionTypeLoadException.Types
property contains the array of types that were defined in the module and were loaded. Этот массив может содержать некоторые значения NULL.This array may contain some null values. ReflectionTypeLoadException.LoaderExceptions
Свойство представляет собой массив исключений, представляющих исключения, которые были созданы загрузчиком.The ReflectionTypeLoadException.LoaderExceptions
property is an array of exceptions that represent the exceptions that were thrown by the loader. Отверстия в массиве классов заканчиваются исключениями.The holes in the class array line up with the exceptions.
Например, если инициализаторы классов одного из классов создают исключение во время загрузки, то объект TargetInvocationException
сохраняется в соответствующем элементе LoaderExceptions
массива.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.
Примечание
Если тип был перенаправлен другой сборке, он не включается в возвращаемый массив.If a type has been forwarded to another assembly, it is not included in the returned array. Дополнительные сведения о пересылке типов см. в разделе Пересылка типов в среде CLR.For information on type forwarding, see Type Forwarding in the Common Language Runtime.