|
Il presente articolo è stato tradotto automaticamente. Passare il puntatore sulle frasi nell'articolo per visualizzare il testo originale. Ulteriori informazioni.
|
Traduzione
Originale
|
Classe Type
Spazio dei nomi: System
Assembly: mscorlib (in mscorlib.dll)
Il tipo Type espone i seguenti membri.
| Nome | Descrizione | |
|---|---|---|
![]() ![]() ![]() | Assembly | |
![]() ![]() ![]() ![]() | AssemblyQualifiedName | |
![]() ![]() ![]() | Attributes | |
![]() ![]() ![]() | BaseType | |
![]() ![]() ![]() | ContainsGenericParameters | |
![]() | CustomAttributes | |
![]() ![]() | DeclaringMethod | |
![]() ![]() ![]() ![]() | DeclaringType | |
![]() ![]() ![]() | DefaultBinder | |
![]() ![]() ![]() ![]() | FullName | |
![]() ![]() | GenericParameterAttributes | |
![]() ![]() ![]() | GenericParameterPosition | |
![]() ![]() | GenericTypeArguments | |
![]() | GUID | |
![]() ![]() ![]() ![]() | HasElementType | |
![]() ![]() ![]() | IsAbstract | |
![]() ![]() | IsAnsiClass | |
![]() ![]() ![]() ![]() | IsArray | |
![]() ![]() | IsAutoClass | |
![]() ![]() | IsAutoLayout | |
![]() ![]() ![]() ![]() | IsByRef | |
![]() ![]() ![]() | IsClass | |
![]() ![]() | IsCOMObject | |
![]() ![]() | IsConstructedGenericType | |
![]() | IsContextful | |
![]() ![]() ![]() | IsEnum | |
![]() | IsExplicitLayout | |
![]() ![]() ![]() ![]() | IsGenericParameter | |
![]() ![]() ![]() | IsGenericType | |
![]() ![]() ![]() | IsGenericTypeDefinition | |
![]() ![]() | IsImport | |
![]() ![]() ![]() | IsInterface | |
![]() | IsLayoutSequential | |
![]() | IsMarshalByRef | |
![]() ![]() ![]() | IsNested | |
![]() ![]() ![]() | IsNestedAssembly | |
![]() ![]() ![]() | IsNestedFamANDAssem | |
![]() ![]() ![]() | IsNestedFamily | |
![]() ![]() ![]() | IsNestedFamORAssem | |
![]() ![]() ![]() | IsNestedPrivate | |
![]() ![]() ![]() | IsNestedPublic | |
![]() ![]() ![]() | IsNotPublic | |
![]() ![]() ![]() ![]() | IsPointer | |
![]() ![]() ![]() | IsPrimitive | |
![]() ![]() ![]() | IsPublic | |
![]() ![]() ![]() | IsSealed | |
![]() | IsSecurityCritical | |
![]() | IsSecuritySafeCritical | |
![]() | IsSecurityTransparent | |
![]() | IsSerializable | |
![]() ![]() ![]() | IsSpecialName | |
![]() ![]() | IsUnicodeClass | |
![]() ![]() ![]() | IsValueType | |
![]() ![]() ![]() | IsVisible | |
![]() ![]() | MemberType | |
![]() | MetadataToken | |
![]() ![]() | Module | |
![]() ![]() ![]() | Name | |
![]() ![]() ![]() ![]() | Namespace | |
![]() ![]() ![]() | ReflectedType | |
![]() | StructLayoutAttribute | |
![]() ![]() ![]() ![]() | TypeHandle | |
![]() | TypeInitializer | |
![]() ![]() ![]() | UnderlyingSystemType |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() ![]() | Equals(Object) | |
![]() ![]() ![]() ![]() | Equals(Type) | |
![]() ![]() ![]() ![]() | Finalize | |
![]() | FindInterfaces | |
![]() | FindMembers | |
![]() ![]() ![]() ![]() | GetArrayRank | |
![]() ![]() | GetAttributeFlagsImpl | |
![]() ![]() ![]() | GetConstructor(Type[]) | |
![]() ![]() | GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) | |
![]() | GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) | |
![]() ![]() | GetConstructorImpl | |
![]() ![]() ![]() | GetConstructors() | |
![]() ![]() ![]() | GetConstructors(BindingFlags) | |
![]() ![]() ![]() | GetCustomAttributes(Boolean) | |
![]() ![]() ![]() | GetCustomAttributes(Type, Boolean) | |
![]() | GetCustomAttributesData | |
![]() ![]() ![]() | GetDefaultMembers | |
![]() ![]() ![]() ![]() | GetElementType | |
![]() | GetEnumName | |
![]() | GetEnumNames | |
![]() | GetEnumUnderlyingType | |
![]() | GetEnumValues | |
![]() ![]() ![]() | GetEvent(String) | |
![]() ![]() ![]() | GetEvent(String, BindingFlags) | |
![]() ![]() ![]() | GetEvents() | |
![]() ![]() ![]() | GetEvents(BindingFlags) | |
![]() ![]() ![]() | GetField(String) | |
![]() ![]() ![]() | GetField(String, BindingFlags) | |
![]() ![]() ![]() | GetFields() | |
![]() ![]() ![]() | GetFields(BindingFlags) | |
![]() ![]() ![]() | GetGenericArguments | |
![]() ![]() | GetGenericParameterConstraints | |
![]() ![]() ![]() ![]() | GetGenericTypeDefinition | |
![]() ![]() ![]() | GetHashCode | |
![]() | GetInterface(String) | |
![]() | GetInterface(String, Boolean) | |
![]() | GetInterfaceMap | |
![]() ![]() ![]() | GetInterfaces | |
![]() ![]() ![]() | GetMember(String) | |
![]() ![]() ![]() | GetMember(String, BindingFlags) | |
![]() | GetMember(String, MemberTypes, BindingFlags) | |
![]() ![]() ![]() | GetMembers() | |
![]() ![]() ![]() | GetMembers(BindingFlags) | |
![]() ![]() ![]() | GetMethod(String) | |
![]() ![]() ![]() | GetMethod(String, BindingFlags) | |
![]() ![]() ![]() | GetMethod(String, Type[]) | |
![]() ![]() | GetMethod(String, Type[], ParameterModifier[]) | |
![]() ![]() | GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) | |
![]() ![]() | GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) | |
![]() ![]() | GetMethodImpl | |
![]() ![]() ![]() | GetMethods() | |
![]() ![]() ![]() | GetMethods(BindingFlags) | |
![]() | GetNestedType(String) | |
![]() ![]() ![]() | GetNestedType(String, BindingFlags) | |
![]() | GetNestedTypes() | |
![]() ![]() ![]() | GetNestedTypes(BindingFlags) | |
![]() ![]() ![]() | GetProperties() | |
![]() ![]() ![]() | GetProperties(BindingFlags) | |
![]() ![]() ![]() | GetProperty(String) | |
![]() ![]() ![]() | GetProperty(String, BindingFlags) | |
![]() ![]() ![]() | GetProperty(String, Type) | |
![]() | GetProperty(String, Type[]) | |
![]() ![]() ![]() | GetProperty(String, Type, Type[]) | |
![]() ![]() | GetProperty(String, Type, Type[], ParameterModifier[]) | |
![]() ![]() | GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) | |
![]() ![]() | GetPropertyImpl | |
![]() ![]() ![]() ![]() | GetType() | In XNA Framework 3.0 questo membro viene ereditato da Object.GetType(). In Libreria di classi portabile Libreria di classi portabile questo membro viene ereditato da Object.GetType(). In .NET per applicazioni Windows Store Windows 8 questo membro viene ereditato da Object.GetType(). |
![]() ![]() ![]() ![]() ![]() | GetType(String) | |
![]() ![]() ![]() ![]() ![]() | GetType(String, Boolean) | |
![]() ![]() ![]() | GetType(String, Boolean, Boolean) | |
![]() ![]() | GetType(String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>) | |
![]() ![]() | GetType(String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>, Boolean) | |
![]() ![]() | GetType(String, Func<AssemblyName, Assembly>, Func<Assembly, String, Boolean, Type>, Boolean, Boolean) | |
![]() ![]() | GetTypeArray | |
![]() ![]() ![]() ![]() | GetTypeCode | |
![]() | GetTypeCodeImpl | |
![]() ![]() ![]() | GetTypeFromCLSID(Guid) | |
![]() ![]() | GetTypeFromCLSID(Guid, Boolean) | |
![]() ![]() | GetTypeFromCLSID(Guid, String) | |
![]() ![]() | GetTypeFromCLSID(Guid, String, Boolean) | |
![]() ![]() ![]() ![]() ![]() | GetTypeFromHandle | |
![]() ![]() | GetTypeFromProgID(String) | |
![]() ![]() | GetTypeFromProgID(String, Boolean) | |
![]() ![]() | GetTypeFromProgID(String, String) | |
![]() ![]() | GetTypeFromProgID(String, String, Boolean) | |
![]() ![]() ![]() | GetTypeHandle | |
![]() ![]() ![]() | HasElementTypeImpl | |
![]() ![]() | InvokeMember(String, BindingFlags, Binder, Object, Object[]) | |
![]() | InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo) | |
![]() ![]() | InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) | |
![]() ![]() ![]() | IsArrayImpl | |
![]() ![]() ![]() | IsAssignableFrom | |
![]() ![]() ![]() | IsByRefImpl | |
![]() ![]() | IsCOMObjectImpl | |
![]() | IsContextfulImpl | |
![]() ![]() ![]() | IsDefined | |
![]() | IsEnumDefined | |
![]() | IsEquivalentTo | |
![]() ![]() ![]() | IsInstanceOfType | |
![]() | IsMarshalByRefImpl | |
![]() ![]() ![]() | IsPointerImpl | |
![]() ![]() ![]() | IsPrimitiveImpl | |
![]() ![]() ![]() | IsSubclassOf | |
![]() ![]() ![]() | IsValueTypeImpl | |
![]() ![]() ![]() | MakeArrayType() | |
![]() ![]() ![]() | MakeArrayType(Int32) | |
![]() ![]() ![]() | MakeByRefType | |
![]() ![]() ![]() ![]() | MakeGenericType | |
![]() ![]() ![]() | MakePointerType | |
![]() ![]() ![]() ![]() | MemberwiseClone | |
![]() ![]() | ReflectionOnlyGetType | |
![]() ![]() ![]() ![]() | ToString |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() | Equality | |
![]() ![]() | Inequality |
| Nome | Descrizione | |
|---|---|---|
![]() | GetCustomAttribute(Type) | Sottoposto a overload. |
![]() | GetCustomAttribute(Type, Boolean) | Sottoposto a overload. |
![]() | GetCustomAttribute<T>() | Sottoposto a overload. |
![]() | GetCustomAttribute<T>(Boolean) | Sottoposto a overload. |
![]() | GetCustomAttributes() | Sottoposto a overload. |
![]() | GetCustomAttributes(Type) | Sottoposto a overload. |
![]() | GetCustomAttributes<T>() | Sottoposto a overload. |
![]() | GetCustomAttributes<T>(Boolean) | Sottoposto a overload. |
![]() ![]() | GetRuntimeEvent | |
![]() ![]() | GetRuntimeEvents | |
![]() ![]() | GetRuntimeField | |
![]() ![]() | GetRuntimeFields | |
![]() ![]() | GetRuntimeMethod | |
![]() ![]() | GetRuntimeMethods | |
![]() ![]() | GetRuntimeProperties | |
![]() ![]() | GetRuntimeProperty | |
![]() ![]() | GetTypeInfo | |
![]() | IsDefined |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() ![]() | Delimiter | |
![]() ![]() | EmptyTypes | |
![]() ![]() | FilterAttribute | |
![]() ![]() | FilterName | |
![]() ![]() | FilterNameIgnoreCase | |
![]() ![]() ![]() ![]() ![]() | Missing |
| Nome | Descrizione | |
|---|---|---|
![]() ![]() | _MemberInfo.GetIDsOfNames | |
![]() ![]() | _MemberInfo.GetType | |
![]() ![]() | _MemberInfo.GetTypeInfo | |
![]() ![]() | _MemberInfo.GetTypeInfoCount | |
![]() ![]() | _MemberInfo.Invoke | |
![]() ![]() | _Type.GetIDsOfNames | |
![]() ![]() | _Type.GetTypeInfo | |
![]() ![]() | _Type.GetTypeInfoCount | |
![]() ![]() | _Type.Invoke |
Nota |
|---|
Classi Tipi di valore Matrici Interfacce Puntatori Enumerazioni Tipi generici costruiti e definizioni di tipo generico Argomenti e parametri di tipo di tipi generici costruiti, definizioni di tipo generico e definizioni di metodo generico
Il metodo Object.GetType restituisce un oggetto Type che rappresenta il tipo di un'istanza. Il metodo GetType statico restituisce un oggetto Type che rappresenta un tipo specificato con il nome completo. I metodi Module.GetTypes, Module.GetType e Module.FindTypes restituiscono oggetti Type che rappresentano i tipi definiti in un modulo. Il primo metodo può essere utilizzato per ottenere una matrice di oggetti Type per tutti i tipi pubblici e privati definiti in un modulo. Per ottenere un'istanza di Module è possibile utilizzare il metodo Assembly.GetModule o Assembly.GetModules, oppure la proprietà Type.Module. L'oggetto System.Reflection.Assembly contiene un numero di metodi per recuperare le classi definite in un assembly, tra cui Assembly.GetType, Assembly.GetTypes e Assembly.GetExportedTypes. Il metodo FindInterfaces restituisce un elenco filtrato dei tipi di interfaccia supportati da un tipo. Il metodo GetElementType restituisce un oggetto Type che rappresenta l'elemento. I metodi GetInterfaces e GetInterface restituiscono oggetti Type che rappresentano i tipi di interfaccia supportati da un tipo. Il metodo GetTypeArray restituisce una matrice di oggetti Type che rappresentano i tipi specificati da un insieme arbitrario di oggetti. Gli oggetti sono specificati con una matrice di tipo Object. I metodi GetTypeFromProgID e GetTypeFromCLSID sono forniti per l'interoperabilità COM. Restituiscono un oggetto Type che rappresenta il tipo specificato da un ProgID o CLSID. Il metodo GetTypeFromHandle viene fornito per l'interoperabilità. Restituisce un oggetto Type che rappresenta il tipo specificato da un handle della classe. L'operatore typeof C#, l'operatore typeid C++ e l'operatore GetType Visual Basic ottengono l'oggetto Type per un tipo. Il metodo MakeGenericType restituisce un oggetto Type che rappresenta un tipo generico costruito, ovvero un tipo costruito aperto se la relativa proprietà ContainsGenericParameters restituisce true e un tipo costruito chiuso in caso contrario. È possibile creare un'istanza di un tipo generico soltanto se si tratta di un tipo generico chiuso. I metodi MakeArrayType, MakePointerType e MakeByRefType restituiscono oggetti Type che rappresentano rispettivamente una matrice di un tipo specificato, un puntatore a un tipo specificato e il tipo di un parametro di riferimento (ref in C#, ByRef in Visual Basic).
Nota |
|---|
Nota |
|---|
Quando si eredita da Type, è necessario sottoporre a override i seguenti membri: GUID, InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]), Module, Assembly, TypeHandle, FullName, Namespace, AssemblyQualifiedName, BaseType, GetConstructorImpl, GetConstructors(BindingFlags), GetMethodImpl, GetMethods(BindingFlags), GetField(String, BindingFlags), GetFields(BindingFlags), GetInterface(String, Boolean), GetInterfaces(), GetEvent(String, BindingFlags), GetEvents(BindingFlags), GetPropertyImpl, GetProperties(BindingFlags), GetNestedType(String, BindingFlags), GetNestedTypes(BindingFlags), GetAttributeFlagsImpl, IsArrayImpl, IsByRefImpl, IsPointerImpl, IsPrimitiveImpl, IsCOMObjectImpl, GetElementType(), HasElementTypeImpl, UnderlyingSystemType, MemberInfo.Name, MemberInfo.IsDefined, MemberInfo.GetCustomAttributes(Boolean) e GetCustomAttributes.
Nota |
|---|
using System; using System.Reflection; class Example { static void Main() { Type t = typeof(String); MethodInfo substr = t.GetMethod("Substring", new Type[] { typeof(int), typeof(int) }); Object result = substr.Invoke("Hello, World!", new Object[] { 7, 5 }); Console.WriteLine("{0} returned \"{1}\".", substr, result); } } /* This code example produces the following output: System.String Substring(Int32, Int32) returned "World". */
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (ruoli di base del server non supportati), Windows Server 2008 R2 (ruoli di base del server supportati con SP1 o versione successiva, Itanium non supportato)
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.


