The following line of code:
By I like knowing what type all of my variables are so I always type my variables. Therefore the following "cleaner" line of code should work:
Error: Specified cast is not valid.
The same holds true for ScriptSettings itself which claims its an XmlDocument yet it can’t be cast to an XmlDocument. This also prevents you from passing it into a C# DLL as a parameter because it can’t be typed.
Does anyone know what’s going on here?
~jr
var rootElement = ScriptSettings.DocumentElement;Displays: System.Xml.XmlElement
MessageBox.Show(rootElement);
By I like knowing what type all of my variables are so I always type my variables. Therefore the following "cleaner" line of code should work:
var rootElement : System.Xml.XmlElement = ScriptSettings.DocumentElement;But it doesn’t! Instead it just displays:
MessageBox.Show(rootElement);
Error: Specified cast is not valid.
The same holds true for ScriptSettings itself which claims its an XmlDocument yet it can’t be cast to an XmlDocument. This also prevents you from passing it into a C# DLL as a parameter because it can’t be typed.
Does anyone know what’s going on here?
~jr