Guest User

Untitled

a guest
Apr 17th, 2012
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Does XPathDocument use the memory stream it is constructed with after construction?
  2. // Take the xml message and turn it into an object
  3. var bytes = Encoding.ASCII.GetBytes(message);
  4. var memoryStream = new MemoryStream(bytes);
  5.  
  6. XPathDocument xPathDocument = new XPathDocument(memoryStream);
  7.  
  8. // Take the xml message and turn it into an object
  9. var bytes = Encoding.ASCII.GetBytes(message);
  10. var memoryStream = new MemoryStream(bytes);
  11.  
  12. XPathDocument xPathDocument = null;
  13. using(memoryStream)
  14. {
  15. XPathDocument xPathDocument = new XPathDocument(memoryStream);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment