By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,365 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Catch Stream as a String

P: n/a
Hi All,

I want to catch a stream as a string.....please see below:

Dim stXML As Stream
Dim sReturn as string
dsResult.WriteXml(stXML)

I want the value of the stream stXML as a string. stXML is a stream.

Thanks in anticipation.
Regards
Rohit
Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Rohit,
Have you considered using a StreamReader to read the Stream?

Something like (untested):
Dim stXML As Stream Dim reader As New StreamReader(stXML) Dim sReturn as string sReturn = reader.ReadToEnd()

Hope this helps
Jay

"Rohit Sharma" <lt*************@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl... Hi All,

I want to catch a stream as a string.....please see below:

Dim stXML As Stream
Dim sReturn as string
dsResult.WriteXml(stXML)

I want the value of the stream stXML as a string. stXML is a stream.

Thanks in anticipation.
Regards
Rohit

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.