Private Sub IsNothing_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IsNothing.Click
Dim sl As SortedList = New SortedList
Dim slNull As SortedList = New SortedList
sl.Add("A", "0")
sl.Add("B", "1")
If sl Is Nothing Then
MsgBox("sl is nothing")
Else
MsgBox("sl has elem" & " " & sl.GetByIndex(0).ToString & " " & sl.GetByIndex(1).ToString)
End If
slNull.Add("a", "0")
slNull.Add("b", "1")
slNull = Nothing
If slNull Is Nothing Then
MsgBox("slNull is nothing")
Else
MsgBox("slNull has elem")
End If
End Sub
Dim sl As SortedList = New SortedList
Dim slNull As SortedList = New SortedList
sl.Add("A", "0")
sl.Add("B", "1")
If sl Is Nothing Then
MsgBox("sl is nothing")
Else
MsgBox("sl has elem" & " " & sl.GetByIndex(0).ToString & " " & sl.GetByIndex(1).ToString)
End If
slNull.Add("a", "0")
slNull.Add("b", "1")
slNull = Nothing
If slNull Is Nothing Then
MsgBox("slNull is nothing")
Else
MsgBox("slNull has elem")
End If
End Sub