DynamicMethod.Attributes Tulajdonság

Definíció

Lekéri a dinamikus metódus létrehozásakor megadott attribútumokat.

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

Tulajdonság értéke

A metódus attribútumait képviselő értékek bitenkénti kombinációja MethodAttributes .

Példák

Az alábbi példakód egy dinamikus metódus metódusattribútumait jeleníti meg. Ez a példakód egy nagyobb, az DynamicMethod osztályhoz tartozó példa része.

// 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)

Megjegyzések

A dinamikus metódusok metódusattribútumai jelenleg mindig Public és Static.

A következőre érvényes: