Module.GetTypes Método
Definição
Retorna todos os tipos definidos nesse módulo.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()
Retornos
- Type[]
Uma matriz do tipo Type
que contém os tipos definidos no módulo que é refletido por essa instância.An array of type Type
containing types defined within the module that is reflected by this instance.
Exceções
Uma ou mais classes em um módulo não puderam ser carregadas.One or more classes in a module could not be loaded.
O chamador não tem a permissão necessária.The caller does not have the required permission.
Comentários
ReflectionTypeLoadException
é uma exceção de carregamento especial.ReflectionTypeLoadException
is a special load exception. A ReflectionTypeLoadException.Types
propriedade contém a matriz de tipos que foram definidos no módulo e que foram carregados.The ReflectionTypeLoadException.Types
property contains the array of types that were defined in the module and were loaded. Essa matriz pode conter alguns valores nulos.This array may contain some null values. A ReflectionTypeLoadException.LoaderExceptions
propriedade é uma matriz de exceções que representa as exceções que foram geradas pelo carregador.The ReflectionTypeLoadException.LoaderExceptions
property is an array of exceptions that represent the exceptions that were thrown by the loader. Os orifícios na matriz de classe se alinham com as exceções.The holes in the class array line up with the exceptions.
Por exemplo, se os inicializadores de classe de uma das classes geram uma exceção enquanto ele está sendo carregado, um TargetInvocationException
é armazenado no elemento correspondente da LoaderExceptions
matriz.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.
Observação
Se um tipo foi encaminhado para outro assembly, ele não é incluído na matriz retornada.If a type has been forwarded to another assembly, it is not included in the returned array. Para obter informações sobre o encaminhamento de tipo, consulte o encaminhamento de tipo no Common Language Runtime.For information on type forwarding, see Type Forwarding in the Common Language Runtime.