ResultTypeAttribute.Type Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the valid or expected type mapping for a function having various result types.

Namespace:   System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public Type Type { get; }

Property Value

Type: System.Type

The type of result (Type).

This attribute applies to functions returning various result types. It is used to declare the possible result types returned from the function. For inheritance types, only the root type of the inheritance hierarchy needs to be specified.

[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
Available since 3.5
Return to top
Show: