> Is there a way to inherit Microsoft.JScript.ArrayObject? I have done
> something similar with JSObject and it works great.
No, not really. That's not a supported scenario.
Nevertheless, if you want to write brittle and non-supportable could, you
*could* hand-compile some IL that called the private constructor for you. As
long as your code is granted "SkipVerification" permission (all FullTrust
code has this) then it should succeed. In theory.
I do not recommend this at all though.
Basically you would write a simple "MyArrayObject" in IL that did nothing
except expose a public constructor that called the ArrayObject's private
constructor. Then you'd inherit from this in your other code and do all the
work you wanted (ie, you only have to write the intermediate wrapper in IL,
not your whole program).
Again, I DO NOT RECOMMEND THIS!
> The reason why I need to is because I'm actually faking JScript
> datastructures by wrapping JSObject around an XML Dom. When the JScript
> engine makes changes to it's objects, the xml structures are updated.
Sounds interesting... ;-)
> ArrayObject, however, has no public constructors making it difficult to
> inherit. Is there a way I can do something similar? I have considered
> inheriting ArrayList, but that means I need to expose mscorlib to the script
> engine (for System.Collections) which is something I don't really want to
> do.
Every .NET assembly binds to mscorlib. It has stuff like String and Int32 in
it.
Peter

Signature
Please post questions to the newsgroup - everyone benefits.
This post is provided "AS IS" with no warranties, and confers no rights
Sample code subject to http://www.microsoft.com/info/cpyright.htm