Editare

Partajați prin


DynamicMethod.Attributes Property

Definition

Gets the attributes specified when the dynamic method was created.

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

Property Value

A bitwise combination of the MethodAttributes values representing the attributes for the method.

Examples

The following code example displays the method attributes of a dynamic method. This code example is part of a larger example provided for the DynamicMethod class.

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

Remarks

Currently, the method attributes for a dynamic method are always Public and Static.

Applies to