Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: casting

$
0
0
Hi furesoft,

You can expose System.Convert to the script engine, or use HostFunctions.cast(). Keep in mind however that numbers are converted to native JavaScript or VBScript values when brought into the script engine. If you need to invoke a host method that requires a numeric argument of a specific .NET type, you may have to use a function such as HostFunctions.toInt16() to ensure proper method binding.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Trending Articles