I can't find any info about whether or not I should dispose/close this object after using it... Here is the msdn link: http://msdn.microsoft.com/en-us/library/bb343181.aspx
And, the easiest way to do that is with 'Go To Definition', 'Object Browser' or Reflector
Bertvan
2010-09-09 20:28:15
And of course, as Andrew said, the answer is No :)
Bertvan
2010-09-09 20:29:21
Sure, that's a good/simple way to do this... I really couldn't find a dispose of close method, so I'm under the assumption that like Andrew said, this is really handled by the XDocument class it self. Thanks for your quick answer.
Wagner Danda da Silva
2010-09-09 20:42:17
+4
A:
No, you don't - it doesn't even implement IDisposable
. The XDocument
and XElement
classes use XmlReader
under the covers and handle the disposing of the underlying reader for you.
Andrew Hare
2010-09-09 20:26:40