Share via


DataServiceProviderMethods.TypeAs<T> Method

Checks whether the given type is assignable from the resource type of a supplied object instance.

Namespace:  System.Data.Services.Providers
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

Syntax

'Declaration
Public Shared Function TypeAs(Of T) ( _
    value As Object, _
    type As ResourceType _
) As T
'Usage
Dim value As Object 
Dim type As ResourceType 
Dim returnValue As T

returnValue = DataServiceProviderMethods.TypeAs(value, _
    type)
public static T TypeAs<T>(
    Object value,
    ResourceType type
)
public:
generic<typename T>
static T TypeAs(
    Object^ value, 
    ResourceType^ type
)
static member TypeAs : 
        value:Object * 
        type:ResourceType -> 'T 
JScript does not support generic types and methods.

Type Parameters

  • T
    Type of the value.

Parameters

Return Value

Type: T
Returns a null value when the value is not of the specified type; otherwise returns the supplied value.

See Also

Reference

DataServiceProviderMethods Class

System.Data.Services.Providers Namespace