Share via


ResultTypeAttribute.Type 속성

정의

결과 형식이 다양한 함수에서 유효하거나 필요한 형식 매핑을 가져옵니다.

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

속성 값

결과의 형식(Type)입니다.

예제

[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));
}
<FunctionAttribute(Name:="dbo.VariableResultShapes"), _
ResultType(GetType(VariableResultShapesResult1)), _
ResultType(GetType(VariableResultShapesResult2))> _
Public Function VariableResultShapes(<Parameter(DbType:="Int")> ByVal shape As System.Nullable(Of Integer)) As IMultipleResults
    Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod, MethodInfo), shape)
    Return CType(result.ReturnValue, IMultipleResults)
End Function

설명

다양 한 결과 형식을 반환 하는 함수에이 특성이 적용 됩니다. 함수에서 반환 된 가능한 결과 형식을 선언 하는 것이 됩니다. 형식 상속에 대 한 상속 계층 구조의 루트 형식에만 지정 해야 합니다.

적용 대상