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 de Propriedade

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

Exemplos

O seguinte exemplo de código mostra os atributos do 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(vbCrLf & "Method Attributes: {0}", _
    hello.Attributes)

Observações

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

Aplica-se a