ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
HostFunctions Class
HostFunctions Methods
asType<T> Method
cast<T> Method
del<T> Method
flags<T> Method
func Method
getElement Method
getProperty Method
isNull Method
isType<T> Method
isTypeObj Method
newArr Method
newObj Method
newVar<T> Method
proc Method
removeElement Method
removeProperty Method
setElement Method
setProperty Method
toByte Method
toChar Method
toDecimal Method
toDouble Method
toInt16 Method
toInt32 Method
toInt64 Method
toSByte Method
toSingle Method
toStaticType Method
toUInt16 Method
toUInt32 Method
toUInt64 Method
tryCatch Method
typeOf Method

# HostFunctionstoStaticType Method

Casts a dynamic host object to its static type.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public Object toStaticType(
    	IDynamicMetaObjectProvider value
    )

    Public Function toStaticType (
    	value As IDynamicMetaObjectProvider
    ) As Object

    public:
    Object^ toStaticType(
    	IDynamicMetaObjectProvider^ value
    )

    member toStaticType :
            value : IDynamicMetaObjectProvider -> Object

#### Parameters

value IDynamicMetaObjectProvider
  The object to cast to its static type.

#### Return Value

Object
The specified object in its static type form, stripped of its dynamic members.
Remarks
A dynamic host object that implements IDynamicMetaObjectProvider may have dynamic members that override members of its static type. This function can be used to gain access to type members overridden in this manner.
See Also

#### Reference

HostFunctions Class
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft