DynamicMethod.Attributes Vlastnost

Definice

Získá atributy zadané při vytvoření dynamické metody.

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

Hodnota vlastnosti

Bitové kombinace MethodAttributes hodnot představujících atributy pro metodu.

Příklady

Následující příklad kódu zobrazuje atributy metody dynamické metody. Tento příklad kódu je součástí většího příkladu DynamicMethod pro třídu .

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

Poznámky

V současné době jsou atributy metody pro dynamickou metodu vždy Public a Static.

Platí pro