共用方式為


DynamicMethod.Name 屬性

定義

取得動態方法的名稱。

public:
 virtual property System::String ^ Name { System::String ^ get(); };
public override string Name { get; }
member this.Name : string
Public Overrides ReadOnly Property Name As String

屬性值

方法的簡單名稱。

範例

下列程式代碼範例會顯示動態方法的名稱。 此程式代碼範例是針對 類別提供的較大範例的 DynamicMethod 一部分。

// Display the name specified when the dynamic method was created.
// Note that the name can be blank.
Console::WriteLine("\r\nName: {0}", hello->Name);
// Display the name specified when the dynamic method was created.
// Note that the name can be blank.
Console.WriteLine("\r\nName: {0}", hello.Name);
' Display the name specified when the dynamic method was created.
' Note that the name can be blank.
Console.WriteLine(vbCrLf & "Name: {0}", hello.Name)

備註

注意

不需要命名動態方法。

適用於