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.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public Object newObj(
Object type,
params Object[] args
)
Public Function newObj (
type As Object,
ParamArray args As Object()
) As Object
public:
Object^ newObj(
Object^ type,
... array<Object^>^ args
)
member newObj :
type : Object *
args : Object[] -> Object
Parameters
- type Object
- The type of object to create.
- args Object
- Optional constructor arguments.
Return Value
ObjectA 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