Partilhar via


SP.ClientRuntimeContext.castTo(obj, type) Method

Applies to: SharePoint Foundation 2010

In this article
Return Value
Applies To
Remarks

Casts a specified client object to its derived type.

var value = SP.ClientRuntimeContext.castTo(obj, type);

Parameters

Type: SP.ClientObject

  • type
    The object that represents the derived type of the provided client object.

Type: Type

Return Value

Type: SP.ClientObject

Applies To

SP.ClientRuntimeContext Class

Remarks

This method casts the specified client object only to its derived client object; therefore, the destination object must also inherit from the SP.ClientObject Class.

See Also

Reference

SP.ClientRuntimeContext Methods

SP.ClientRuntimeContext Properties

SP Namespace