A ad May 16, 2006 #1 I have a Steam, it read from a text file. How can I convert this Stream to a String?
C Chris Dunaway May 16, 2006 #2 What kind of stream? You should be able to use a StreamReader to get the contents of the stream.
S Sericinus hunter May 16, 2006 #3 ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... Is StreamReader.ReadToEnd() what you are looking for?
ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... Is StreamReader.ReadToEnd() what you are looking for?
T Tom Porterfield May 16, 2006 #4 ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... See the following: How to: Read Text from a File http://msdn2.microsoft.com/en-us/library/db5x7c0d.aspx
ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... See the following: How to: Read Text from a File http://msdn2.microsoft.com/en-us/library/db5x7c0d.aspx
B Barry Kelly May 16, 2006 #5 ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... The easiest way is skip the stream and just do File.ReadAllText(). Alternatively, if you must use the stream, then do: ---8<--- new StreamReader(stream).ReadToEnd() --->8--- -- Barry
ad said: I have a Steam, it read from a text file. How can I convert this Stream to a String? Click to expand... The easiest way is skip the stream and just do File.ReadAllText(). Alternatively, if you must use the stream, then do: ---8<--- new StreamReader(stream).ReadToEnd() --->8--- -- Barry