If I have code in a subroutine thusly:
Then I have someSub declared elsewhere defined like:
when someSub is called it will be passed a StreamReader object pointing to a file called test.txt, no? Or should I be passing it by reference? Asking because it does not appear that someSub is actually reading test.txt - I have this code in someSub:
A logic statement I have is not working I think because aLine is showing up with no value in my Locals window. Do I need to pass it by reference instead?
Code:
Dim aReadStream = IO.StreamReader
[SIZE=2]aReadStream = IO.File.OpenText("c:\test.txt")[/SIZE]
[SIZE=2]someSub(aReadStream)[/SIZE]
Code:
Public Sub someSub(ByVal aStream as IO.StreamReader)
Code:
aLine = aStream.ReadLine

I know we have some programmers here. I figured out the problem though.
Comment