G
Guest
hi...just a quick question. what are the differences in using a FileStream
and StreamWriter opposed to just a StreamWriter.....for instance
Dim fs as New FileStream("C:\Test.txt",...)
Dim sw As New StreamWriter(fs)
sw.WriteLine("Stuff")
sw.Flush()
sw.Close()
fs.Close()
and
Dim sw As New StreamWriter("C:\Text.txt")
sw.WriteLine("Stuff")
sw.Flush()
sw.Close()
like obviously memory is different since in the first one there are 2
objects created and only one in the second....but what other significant
differences are there? should i use one way or another? thanks
and StreamWriter opposed to just a StreamWriter.....for instance
Dim fs as New FileStream("C:\Test.txt",...)
Dim sw As New StreamWriter(fs)
sw.WriteLine("Stuff")
sw.Flush()
sw.Close()
fs.Close()
and
Dim sw As New StreamWriter("C:\Text.txt")
sw.WriteLine("Stuff")
sw.Flush()
sw.Close()
like obviously memory is different since in the first one there are 2
objects created and only one in the second....but what other significant
differences are there? should i use one way or another? thanks