Hi Sybaris,
A JavaScript class (really just a function) cannot be used as a .NET type argument. As far as the managed side is concerned, it's just a script object and has no public runtime type beyond
Therefore an instance of a JavaScript class, like any script object, can be stored in a managed collection of type
Thanks for your question, and good luck!
A JavaScript class (really just a function) cannot be used as a .NET type argument. As far as the managed side is concerned, it's just a script object and has no public runtime type beyond
DynamicObject
.Therefore an instance of a JavaScript class, like any script object, can be stored in a managed collection of type
DynamicObject
, IDynamicMetaObjectProvider
, or simply Object
:function MyClass() { this.MyValue = 10; } var list = new DotNet.System.Collections.Generic.List(DotNet.System.Object); list.Add(new MyClass()); var test = list[0].MyValue; // test == 10