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(vbCrLf & "Name: {0}", hello.Name)

備註

Note

無需明確命名動態方法。

適用於