Don't have the IDE handily available so going off memory here....
StringReader someReader = new StringReader(<your memorystream>);
string result = someReader.ReadToEnd();
William L. Howell
Oregon Department of Fish & Wildlife
________________________________
From: padnug@xxxxxxxxxxxxxxx [mailto:padnug@xxxxxxxxxxxxxxx] On Behalf
Of Keith R. Pinster
Sent: Wednesday, June 14, 2006 1:04 PM
To: padnug@xxxxxxxxxxxxxxx
Subject: [padnug] Re: Converting a MemoryStream to a String
Woops, looks like that doesn't work. I get an "Argument
type 'System.IO.MemoryStream' is not assignable to parameter type 'byte
[]'" message.
--- In padnug@xxxxxxxxxxxxxxx <mailto:padnug%40yahoogroups.com> , "Sonny
N." <javabrewery@...> wrote:
>
> Encoding.UTF8.GetString(sContents)
>
> --- "Keith R. Pinster" <dimondwoof@...> wrote:
>
> > I've been banging my head against this for a couple
> > of hours and just
> > can't figure it out. I've got an object that dumps
> > it's result into a
> > MemoryStream object. Can someone tell me how to
> > convert this to a
> > string?
> >
> > Thanks
> > KRP
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~->
|