DynamicMethod.ReturnType 속성

정의

동적 메서드의 반환 값 형식을 가져옵니다.

public:
 virtual property Type ^ ReturnType { Type ^ get(); };
public override Type ReturnType { get; }
member this.ReturnType : Type
Public Overrides ReadOnly Property ReturnType As Type

속성 값

Type

현재 메서드의 반환 값 형식을 나타내는 Type 입니다. 메서드에 반환 형식이 없으면 Void 입니다.

예제

다음 코드 예제에서는 동적 메서드의 반환 형식을 표시합니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DynamicMethod 클래스입니다.

// If the method has no return type, ReturnType is System.Void.
Console::WriteLine("\r\nReturn type: {0}", hello->ReturnType);
// If the method has no return type, ReturnType is System.Void.
Console.WriteLine("\r\nReturn type: {0}", hello.ReturnType);
' If the method has no return type, ReturnType is System.Void.
Console.WriteLine(vbCrLf & "Return type: {0}", hello.ReturnType)

설명

동적 메서드를 만들 때 반환 형식에 대해 지정된 경우 null 이 속성은 반환됩니다 System.Void.

적용 대상