DynamicMethod.Attributes Proprietà

Definizione

Ottiene gli attributi specificati quando il metodo dinamico è stato creato.

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

Valore della proprietà

Combinazione bit per bit dei valori MethodAttributes che rappresentano gli attributi relativi al metodo.

Esempio

Nell'esempio di codice seguente vengono visualizzati gli attributi del metodo di un metodo dinamico. Questo esempio di codice fa parte di un esempio più grande fornito per 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)

Commenti

Attualmente, gli attributi del metodo per un metodo dinamico sono sempre Public e Static.

Si applica a