Warning: Variable 'XYZ' is used before it has been assigned a value. A null reference exception could result at runtime
BC42104: Variable 'XYZ' is used before it has been assigned a value. A null reference exception could result at runtime
This error occurs when the variable is used before assigning a value. Most often it can be a part of some conditional statements
Dim sCurrentStage As String ' Holds the Current Process Name
…
Write2Log(sErrorText & " in " & sCurrentStage)
To avoid this warning assign a value in declaration
Dim sCurrentStage As String = "" ' Holds the Current Process Name
No comments:
Post a Comment