DynamicMethod.Attributes Propriedade

Definição

Obtém os atributos especificados quando o método dinâmico foi criado.

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

Valor da propriedade

Uma combinação bit a bit dos MethodAttributes valores que representam os atributos para o método .

Exemplos

O exemplo de código a seguir exibe os atributos de método de um método dinâmico. Este exemplo de código faz parte de um exemplo maior fornecido para a 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)

Comentários

Atualmente, os atributos de método para um método dinâmico são sempre Public e Static.

Aplica-se a