Instantiating DotNet variable of subtype XElement

jhoekjhoek Member Posts: 216
edited 2012-02-02 in NAV Three Tier
I'm trying to instantiate a DotNet variable of type System.Xml.Linq.XElement, using this statement:
MyXElement := MyXElement.XElement('foo');
but keep getting this error message:
Ambigous function call, no matching method found.

A similar call for a System.Xml.Linq.XDocument succeeds without any problem:
MyXDocument := MyXDocument.XDocument();

XElement's factory method XElement() accepts a single XName as its parameter (in the overload that I would like to use). Normally (e.g. from C#), you pass a string to the function, which is converted implicitly to an XName - the latter class doesn't have a public constructor for me to call.

Could it be that C/SIDE is unaware of this conversion, and still expects an XName? Is there a way to work around this?
Kind regards,

Jan Hoek
Product Developer
Mprise Products B.V.

Answers

Sign In or Register to comment.