ITypeResolutionService.GetType Metodo

Definizione

Carica un tipo con il nome specificato.

Overload

Nome Descrizione
GetType(String)

Carica un tipo con il nome specificato.

GetType(String, Boolean)

Carica un tipo con il nome specificato.

GetType(String, Boolean, Boolean)

Carica un tipo con il nome specificato.

GetType(String)

Carica un tipo con il nome specificato.

public:
 Type ^ GetType(System::String ^ name);
public Type GetType(string name);
abstract member GetType : string -> Type
Public Function GetType (name As String) As Type

Parametri

name
String

Nome del tipo. Se il nome del tipo non è un nome completo che indica un assembly, questo servizio eseguirà la ricerca nel set interno di assembly a cui si fa riferimento.

Valori restituiti

Istanza di Type che corrisponde al nome specificato o null se non è possibile trovare alcun tipo.

Si applica a

GetType(String, Boolean)

Carica un tipo con il nome specificato.

public:
 Type ^ GetType(System::String ^ name, bool throwOnError);
public Type GetType(string name, bool throwOnError);
abstract member GetType : string * bool -> Type
Public Function GetType (name As String, throwOnError As Boolean) As Type

Parametri

name
String

Nome del tipo. Se il nome del tipo non è un nome completo che indica un assembly, questo servizio eseguirà la ricerca nel set interno di assembly a cui si fa riferimento.

throwOnError
Boolean

true se questo metodo deve generare un'eccezione se l'assembly non può trovarsi; in caso contrario, falsee questo metodo restituisce null se l'assembly non può trovarsi.

Valori restituiti

Istanza di Type che corrisponde al nome specificato o null se non è possibile trovare alcun tipo.

Commenti

Se il tipo non può essere caricato e il throwOnError parametro è true, verrà generata un'eccezione.

Si applica a

GetType(String, Boolean, Boolean)

Carica un tipo con il nome specificato.

public:
 Type ^ GetType(System::String ^ name, bool throwOnError, bool ignoreCase);
public Type GetType(string name, bool throwOnError, bool ignoreCase);
abstract member GetType : string * bool * bool -> Type
Public Function GetType (name As String, throwOnError As Boolean, ignoreCase As Boolean) As Type

Parametri

name
String

Nome del tipo. Se il nome del tipo non è un nome completo che indica un assembly, questo servizio eseguirà la ricerca nel set interno di assembly a cui si fa riferimento.

throwOnError
Boolean

true se questo metodo deve generare un'eccezione se l'assembly non può trovarsi; in caso contrario, falsee questo metodo restituisce null se l'assembly non può trovarsi.

ignoreCase
Boolean

true per ignorare la distinzione tra maiuscole e minuscole durante la ricerca di tipi; in caso contrario, false.

Valori restituiti

Istanza di Type che corrisponde al nome specificato o null se non è possibile trovare alcun tipo.

Commenti

Se il tipo non può essere caricato e il throwOnError parametro è true, verrà generata un'eccezione.

Si applica a