StreamReader question - just curious
Hello,
Just curious, what's the difference between:
Code:
Dim sr As StreamReader = File.OpenText(SourceFileLocation)
and
Code:
Dim sr As StreamReader = New StreamReader(SourceFileLocation)
Both do the same thing of course and both works, but I'm just curious which method I should be using.
Thanks,
Strick
Re: StreamReader question - just curious
top one is clearly a text file.
The second one could be a binary file.
Which one to use depends on the file. If it's a text file, then use the openText.... if it's binary data, then use the streamReader....
-tg