Hi Sybaris,
ClearScript's
Cheers!
ClearScript's
HostFunctions class provides a number of utility methods for situations like this, including typeOf(). The only other thing to be aware of is that ClearScript blocks reflection by default, but you can easily enable it:scriptEngine.AddHostObject("host", new HostFunctions()); scriptEngine.AllowReflection = true; scriptEngine.Execute(@" var dt = new DotNet.System.Data.DataTable('testDataTable'); dt.Columns.Add('Col1', host.typeOf(DotNet.System.Int32)); ");