Hi everyone,
I created an output stream object and all i want to do is be able to use the same object to write to different files:
Dim objWriter As New System.IO.StreamWriter(OutFileName)
... and writing to the file using:
objWriter.WriteLine(WriteThisText)
...it works fine but anyone know if I can reuse the object to write to another file?
I tried just changing the OutFileName... and the .Close, .Flush and .Dispose and then changing the OutFileName but the only thing that works is creating another output object for the second file.
Is this just the way it is? ... or am i missing something?
I created an output stream object and all i want to do is be able to use the same object to write to different files:
Dim objWriter As New System.IO.StreamWriter(OutFileName)
... and writing to the file using:
objWriter.WriteLine(WriteThisText)
...it works fine but anyone know if I can reuse the object to write to another file?
I tried just changing the OutFileName... and the .Close, .Flush and .Dispose and then changing the OutFileName but the only thing that works is creating another output object for the second file.
Is this just the way it is? ... or am i missing something?