DynamicMethod.Attributes Propriété

Définition

Obtient les attributs qui ont été spécifiés quand la méthode dynamique a été créée.

public:
 virtual property System::Reflection::MethodAttributes Attributes { System::Reflection::MethodAttributes get(); };
public override System.Reflection.MethodAttributes Attributes { get; }
member this.Attributes : System.Reflection.MethodAttributes
Public Overrides ReadOnly Property Attributes As MethodAttributes

Valeur de propriété

Combinaison d’opérations de bits des valeurs MethodAttributes représentant les attributs de la méthode.

Exemples

L’exemple de code suivant affiche les attributs de méthode d’une méthode dynamique. Cet exemple de code fait partie d’un exemple plus grand fourni pour la DynamicMethod classe .

// Display MethodAttributes for the dynamic method, set when 
// the dynamic method was created.
Console::WriteLine("\r\nMethod Attributes: {0}", hello->Attributes);
// Display MethodAttributes for the dynamic method, set when
// the dynamic method was created.
Console.WriteLine("\r\nMethod Attributes: {0}", hello.Attributes);
' Display MethodAttributes for the dynamic method, set when 
' the dynamic method was created.
Console.WriteLine(vbCrLf & "Method Attributes: {0}", _
    hello.Attributes)

Remarques

Actuellement, les attributs de méthode d’une méthode dynamique sont toujours Public et Static.

S’applique à