ExtensionsToHostType Method (Type, ScriptEngine) |
Converts a type to a host type for use with script code running in the specified
script engine.
Namespace:
Microsoft.ClearScript
Assembly:
ClearScript.Core (in ClearScript.Core.dll) Version: 7.2.5
Syntaxpublic static Object ToHostType(
this Type type,
ScriptEngine engine
)
<ExtensionAttribute>
Public Shared Function ToHostType (
type As Type,
engine As ScriptEngine
) As Object
public:
[ExtensionAttribute]
static Object^ ToHostType(
Type^ type,
ScriptEngine^ engine
)
[<ExtensionAttribute>]
static member ToHostType :
type : Type *
engine : ScriptEngine -> Object
Parameters
- type
- Type: SystemType
The type to convert to a host type. - engine
- Type: Microsoft.ClearScriptScriptEngine
The script engine in which the host type will be used.
Return Value
Type:
ObjectA host type for use with script code.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also