Use the Remove method to remove a key/value pair
Imports System
Imports System.Collections.Generic
Public Class Example
Public Shared Sub Main()
Dim openWith As New SortedList(Of String, String)
openWith.Add("A", "a")
openWith.Add("B", "b")
openWith.Add("C", "c")
openWith.Add("D", "d")
openWith.Remove("D")
If Not openWith.ContainsKey("D") Then
Console.WriteLine("Key ""doc"" is not found.")
End If
End Sub
End Class
Related examples in the same category