G
Garg
I have declared an array and when i use it in vb.net, I get a warning
that
variable arrClash has been used before it has been assignes a value. A
null reference exception could result at run time. This is my piece of
code;
Dim arrClash() As String
Dim i As Integer
Dim k As Integer
i = 0
For k = 1 To 4 Step 1
Dim drpDown As New DropDownList
drpDown = Page.FindControl("dropBasis" + k.ToString)
If drpDown.SelectedValue <> "" Then
arrClash(i) = drpDown.SelectedValue
i += 1
End If
Next
Please tell me how do I set object rerference to null??????
that
variable arrClash has been used before it has been assignes a value. A
null reference exception could result at run time. This is my piece of
code;
Dim arrClash() As String
Dim i As Integer
Dim k As Integer
i = 0
For k = 1 To 4 Step 1
Dim drpDown As New DropDownList
drpDown = Page.FindControl("dropBasis" + k.ToString)
If drpDown.SelectedValue <> "" Then
arrClash(i) = drpDown.SelectedValue
i += 1
End If
Next
Please tell me how do I set object rerference to null??????