DynamicMethod.Name 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
得到動態方法的名稱。
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
無需明確命名動態方法。