Partilhar via


ClientRuntimeContext.CastTo<T> Method

Casts a specified client object to its derived type.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll);  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)

Syntax

'Declaration
Public Function CastTo(Of T As ClientObject) ( _
    obj As ClientObject _
) As T
'Usage
Dim instance As ClientRuntimeContext
Dim obj As ClientObject
Dim returnValue As T

returnValue = instance.CastTo(obj)
public T CastTo<T>(
    ClientObject obj
)
where T : ClientObject

Type Parameters

  • T
    The derived type of the specified client object.

Parameters

Return Value

Type: T
An object of a generic type.

See Also

Reference

ClientRuntimeContext Class

ClientRuntimeContext Members

Microsoft.SharePoint.Client Namespace