ClientRuntimeContext.CastTo<T> method

Casts a specified client object to its derived type.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)


Public Function CastTo(Of T As ClientObject) ( _
    obj As ClientObject _
) As T
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.


Return value

Type: T
An object of a generic type.

See also


ClientRuntimeContext class

ClientRuntimeContext members

Microsoft.SharePoint.Client namespace