แก้ไข

แชร์ผ่าน


DynamicMethod.Name Property

Definition

Gets the name of the dynamic method.

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

Property Value

The simple name of the method.

Examples

The following code example displays the name of a dynamic method. This code example is part of a larger example provided for the DynamicMethod class.

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

Remarks

Note

It is not necessary to name dynamic methods.

Applies to