I have deserialized an xml file into a C# object and have an "object" containing a specific node I have selected from this file.
I need to check if this node has child nodes. I do not know the specific type of the object at any given time.
At the moment I am just re-serializing the object into a string, and loading it into an XmlDocument before checking the HasChildNodes property, however when I have thousands of nodes to check this is extremely resource intensive and slow.
Can anyone think of a better way I can check if the object I have contains child nodes?
Many thanks :)