I evidently need to go back to remedial .Net class (I even 'Google'-ed this
and didn't come up with much), as it must be so easy that even a neophyte
could do it. So please help a neo-in-training!
I just want to read a text file into a MemoryStream so as to use the stream
for something else. I have instructions that work (I've tested them) for
the 'something else,' but I'm having severe trials with the
text-to-MemoryStream part. This is what I have (that's not working):
Dim sAppDir As String = Replace(Application.StartupPath(), "bin",
String.Empty)
Dim fileIn As New StreamReader(sAppDir & "Test1.xml")
Dim stream As New MemoryStream(fileIn.ReadToEnd.Length)
Dim writer As New StreamWriter(stream)
Dim fileOut As New StreamWriter(sAppDir & "Test1_Results.txt")
writer.Write(fileIn.ReadToEnd.ToString)
Thanx!
--
TFWBWY...A