DynamicMethod.Attributes Özellik

Tanım

Dinamik yöntem oluşturulduğunda belirtilen öznitelikleri alır.

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

Özellik Değeri

Yöntemin MethodAttributes özniteliklerini temsil eden değerlerin bit düzeyinde birleşimi.

Örnekler

Aşağıdaki kod örneği, dinamik bir yöntemin yöntem özniteliklerini görüntüler. Bu kod örneği, sınıfı için DynamicMethod sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

Şu anda dinamik bir yöntemin yöntem öznitelikleri her zaman Public ve Staticşeklindedir.

Şunlara uygulanır