DynamicMethod.Attributes Właściwość

Definicja

Pobiera atrybuty określone podczas tworzenia metody dynamicznej.

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

Wartość właściwości

Bitowa kombinacja MethodAttributes wartości reprezentujących atrybuty metody.

Przykłady

Poniższy przykład kodu przedstawia atrybuty metody dynamicznej. Ten przykład kodu jest częścią większego przykładu podanego DynamicMethod dla klasy.

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

Uwagi

Obecnie atrybuty metody dla metody dynamicznej są zawsze Public i Static.

Dotyczy