Forum Discussion
AlexeyKolosov
Staff
16 years agoHi Priyanka,
both the side is same i.e" XmlDeclaration" type of object still the "==" equal to sign comparison gives false on debugging
You're comparing two object references here, while you actually need to compare the values stored inside the objects. Here is the correct comparison line:
nType["OleValue"] == dotNET["System_Xml"]["XmlNodeType"]["XmlDeclaration"]["OleValue"]
I am doing here C# scripting and i dont think "." dot character will solve the problem
It doesn't matter which syntax you use, actually, unless you are going to use the code in a C# Connected application. C#Script is based on JScript, so you can use JScript syntax too. The same applies to C++Script. Anyway, here is the same line in C#Script syntax:
var xeElementCollection = xeRootNode["Elements"]()["GetEnumerator"]();