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)

注解

注意

无需命名动态方法。

适用于