Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- value
Type: System.Object
The object instance to check.
- type
Type: System.Data.Services.Providers.ResourceType
The ResourceType against which to check for assignability.
Return Value
Type: T
Returns a null value when the value is not of the specified type; otherwise returns the supplied value.