DynamicMethod.Attributes プロパティ

定義

動的メソッドの作成時に指定された属性を取得します。

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

プロパティ値

メソッドの属性を表す MethodAttributes 値のビットごとの組み合わせ。

次のコード例では、動的メソッドのメソッド属性を表示します。 このコード例は、DynamicMethod クラスのために提供されている大規模な例の一部です。

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

注釈

現在、動的メソッドのメソッド属性は常に PublicStaticです。

適用対象