Null argument???

EEguruWSU

New member
Joined
Oct 8, 2003
Messages
1
when I run this code:

Code:
        Dim sr As StreamReader = New StreamReader(mainprogram)
        Dim line As String
        Do
            line = sr.ReadLine()
            If Regex.IsMatch(line, "\s*CALL") Then
            End If
        Loop Until line Is Nothing

I get the following error:

An unhandled exception of type System.ArgumentNullException occurred in system.dll

the error comes from line
If reges.isMatch(line,"\s*CALL")then

Additional information: Value cannot be null.


if you have any suggestion please let me know
 
Last edited by a moderator:
instead of Loop Until line Is Nothing"

Change to "DO" part to something like "Do While sr.ReadLine"
 
Back
Top