RequiredAttributeAttribute Classe
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Spécifie qu'un compilateur qui importe doit comprendre parfaitement la sémantique d'une définition de type, ou refuser de l'utiliser. Cette classe ne peut pas être héritée.
public ref class RequiredAttributeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class RequiredAttributeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class RequiredAttributeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public sealed class RequiredAttributeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class RequiredAttributeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type RequiredAttributeAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RequiredAttributeAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type RequiredAttributeAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type RequiredAttributeAttribute = class
inherit Attribute
Public NotInheritable Class RequiredAttributeAttribute
Inherits Attribute
- Héritage
- Attributs
Vous pouvez appliquer cet attribut à des classes, des structures, des énumérations et des interfaces.
Par exemple, vous pouvez utiliser cet attribut pour marquer une classe C++ qui a un constructeur de copie. Tout compilateur qui utilise une telle classe doit comprendre toutes les contraintes de son utilisation, comme ne jamais créer un objet de cette classe dans le tas récupéré par la mémoire, car une relocalisation n’appelle pas son constructeur de copie.
Les classes dans System.Runtime.CompilerServices sont destinées aux rédacteurs de compilateur utilisent uniquement.
Required |
Initialise une nouvelle instance de la classe RequiredAttributeAttribute. |
Required |
Obtient un type qu'un compilateur d'importation doit comprendre parfaitement. |
Type |
Lors de l'implémentation dans une classe dérivée, obtient un identificateur unique pour l'objet Attribute. (Hérité de Attribute) |
Equals(Object) |
Retourne une valeur qui indique si cette instance est égale à un objet spécifié. (Hérité de Attribute) |
Get |
Retourne le code de hachage de cette instance. (Hérité de Attribute) |
Get |
Obtient le Type de l'instance actuelle. (Hérité de Object) |
Is |
En cas de substitution dans une classe dérivée, indique si la valeur de cette instance est la valeur par défaut pour la classe dérivée. (Hérité de Attribute) |
Match(Object) |
En cas de substitution dans une classe dérivée, retourne une valeur indiquant si cette instance équivaut à un objet spécifié. (Hérité de Attribute) |
Memberwise |
Crée une copie superficielle du Object actuel. (Hérité de Object) |
To |
Retourne une chaîne qui représente l'objet actuel. (Hérité de Object) |
_Attribute. |
Mappe un jeu de noms avec un jeu correspondant d'identificateurs de dispatch. (Hérité de Attribute) |
_Attribute. |
Récupère les informations de type pour un objet, qui peuvent être utilisées pour obtenir les informations de type d'une interface. (Hérité de Attribute) |
_Attribute. |
Récupère le nombre d'interfaces d'informations de type fourni par un objet (0 ou 1). (Hérité de Attribute) |
_Attribute. |
Fournit l'accès aux propriétés et aux méthodes exposées par un objet. (Hérité de Attribute) |
Produit | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :