If the XML is very large, converting it to a string (by way of a UTF8 byte array) will involve a couple of large memcpy operations -- or worse.
In the general case, I think it would be better to rewind the MemoryStream and use XmlTextReader... -S On Tue, 26 Oct 2004 12:08:03 -0600, Steve Johnson <[EMAIL PROTECTED]> wrote: > On Tue, 26 Oct 2004 12:27:38 -0500, Adam Sills > <[EMAIL PROTECTED]> wrote: > > PS - the method on MemoryStream is ToArray, not ToByteArray > > Oops...nice catch. That'll teach me not to compile it first. :) > > -- > Steve Johnson > > > > =================================== > This list is hosted by DevelopMentorŪ http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at http://discuss.develop.com > -- Cheers, -Shawn http://msdn.com/tabletpc http://windojitsu.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with C# November 29 - December 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com