|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
Type, classe
Espace de noms : System
Assembly : mscorlib (dans mscorlib.dll)
Le type Type expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() ![]() ![]() | 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 |
| Nom | Description | |
|---|---|---|
![]() ![]() ![]() | 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() | Dans XNA Framework 3.0, ce membre est hérité de Object.GetType(). Dans Bibliothèque de classes portable Bibliothèque de classes portable, ce membre est hérité de Object.GetType(). Dans .NET pour les applications du Windows Store Windows 8, ce membre est hérité de 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 |
| Nom | Description | |
|---|---|---|
![]() ![]() | Equality | |
![]() ![]() | Inequality |
| Nom | Description | |
|---|---|---|
![]() | GetCustomAttribute(Type) | Surchargé. |
![]() | GetCustomAttribute(Type, Boolean) | Surchargé. |
![]() | GetCustomAttribute<T>() | Surchargé. |
![]() | GetCustomAttribute<T>(Boolean) | Surchargé. |
![]() | GetCustomAttributes() | Surchargé. |
![]() | GetCustomAttributes(Type) | Surchargé. |
![]() | GetCustomAttributes<T>() | Surchargé. |
![]() | GetCustomAttributes<T>(Boolean) | Surchargé. |
![]() ![]() | GetRuntimeEvent | |
![]() ![]() | GetRuntimeEvents | |
![]() ![]() | GetRuntimeField | |
![]() ![]() | GetRuntimeFields | |
![]() ![]() | GetRuntimeMethod | |
![]() ![]() | GetRuntimeMethods | |
![]() ![]() | GetRuntimeProperties | |
![]() ![]() | GetRuntimeProperty | |
![]() ![]() | GetTypeInfo | |
![]() | IsDefined |
| Nom | Description | |
|---|---|---|
![]() ![]() ![]() | Delimiter | |
![]() ![]() | EmptyTypes | |
![]() ![]() | FilterAttribute | |
![]() ![]() | FilterName | |
![]() ![]() | FilterNameIgnoreCase | |
![]() ![]() ![]() ![]() ![]() | Missing |
| Nom | Description | |
|---|---|---|
![]() ![]() | _MemberInfo.GetIDsOfNames | |
![]() ![]() | _MemberInfo.GetType | |
![]() ![]() | _MemberInfo.GetTypeInfo | |
![]() ![]() | _MemberInfo.GetTypeInfoCount | |
![]() ![]() | _MemberInfo.Invoke | |
![]() ![]() | _Type.GetIDsOfNames | |
![]() ![]() | _Type.GetTypeInfo | |
![]() ![]() | _Type.GetTypeInfoCount | |
![]() ![]() | _Type.Invoke |
Remarque |
|---|
Classes Types valeur Tableaux Interfaces Pointeurs Énumérations Types génériques construits et définitions de types génériques Arguments et paramètres de type des types génériques construits, définitions de types génériques et définitions des méthodes génériques
La méthode Object.GetType retourne un objet Type qui représente le type d'une instance. Les méthodes GetType statiques retournent un objet Type qui représente un type spécifié par son nom qualifié complet. Les méthodes Module.GetTypes, Module.GetType et Module.FindTypes retournent des objets Type qui représentent les types définis dans un module. La première méthode peut être utilisée pour obtenir un tableau d'objets Type pour tous les types publics et privés définis dans un module. (Vous pouvez obtenir une instance de Module via la méthode Assembly.GetModule ou Assembly.GetModules, ou via la propriété Type.Module.) L'objet System.Reflection.Assembly contient plusieurs méthodes pour extraire les classes définies dans un assembly, notamment Assembly.GetType, Assembly.GetTypeset Assembly.GetExportedTypes. La méthode FindInterfaces retourne une liste filtrée de types interface pris en charge par un type. La méthode GetElementType retourne un objet Type qui représente l'élément. Les méthodes GetInterfaces et GetInterface retournent des objets Type représentant les types interface pris en charge par un type. La méthode GetTypeArray retourne un tableau d'objets Type représentant les types spécifiés par un ensemble arbitraire d'objets. Les objets sont spécifiés avec un tableau de type Object. Les méthodes GetTypeFromProgID et GetTypeFromCLSID sont fournies pour l'interopérabilité COM. Elles retournent un objet Type qui représente le type spécifié par ProgID ou CLSID. La méthode GetTypeFromHandle est fournie pour l'interopérabilité. Elle retourne un objet Type qui représente le type spécifié par un handle de classe. L'opérateur typeof C#, l'opérateur typeid C++ et l'opérateur GetType Visual Basic obtiennent l'objet Type d'un type. La méthode MakeGenericType retourne un objet Type qui représente un type générique construit, lequel est un type construit ouvert si sa propriété ContainsGenericParameters retourne true ; sinon, c'est un type construit fermé. Un type générique peut être instancié uniquement s'il est fermé. Les méthodes MakeArrayType, MakePointerType et MakeByRefType retournent les objets Type qui représentent, respectivement, un tableau d'un type spécifié, un pointeur vers un type spécifié et le type d'un paramètre de référence (ref en C#, ByRef en Visual Basic).
Remarque |
|---|
Remarque |
|---|
Lorsque vous héritez de Type, vous devez substituer les membres suivants : 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) et GetCustomAttributes.
Remarque |
|---|
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 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.


