Click or drag to resize

HostFunctionsnewObj(Object, Object) Method

Creates a host object of the specified type. This version is invoked if the specified type cannot be used as a type argument.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.7
Syntax
public Object newObj(
	Object type,
	params Object[] args
)

Parameters

type  Object
The type of object to create.
args  Object
Optional constructor arguments.

Return Value

Object
A new host object of the specified type.
Remarks

This function is provided for script languages that do not support external instantiation. It is overloaded with newObjT(Object) and selected at runtime if type cannot be used as a type argument. Note that this applies to some host types that support instantiation, such as certain COM/ActiveX types.

For information about the mapping between host members and script-callable properties and methods, see AddHostObject.

See Also