DynamicMethod.ReturnType プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
動的メソッドの戻り値の型を取得します。
public:
virtual property Type ^ ReturnType { Type ^ get(); };
public override Type ReturnType { get; }
member this.ReturnType : Type
Public Overrides ReadOnly Property ReturnType As 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。
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET