英語で読む

次の方法で共有


ResultTypeAttribute.Type プロパティ

定義

さまざまな結果型を持つ関数に対する有効な型または予測される型の対応付けを取得します。

C#
public Type Type { get; }

プロパティ値

結果の型 (Type)。

C#
[Function(Name="dbo.VariableResultShapes")]
[ResultType(typeof(VariableResultShapesResult1))]
[ResultType(typeof(VariableResultShapesResult2))]
public IMultipleResults VariableResultShapes([Parameter(DbType="Int")] System.Nullable<int> shape)
{
    IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), shape);
    return ((IMultipleResults)(result.ReturnValue));
}

注釈

この属性は、さまざまな結果の型を返す関数に適用されます。 関数から返される可能性のある結果の型を宣言するために使用されます。 継承型の場合は、継承階層のルート型のみを指定する必要があります。

適用対象

製品 バージョン
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1