Mega Code Archive

 
Categories / VB.Net / Data Structure
 

The Item property is the default property, so you can omit its name when accessing elements

Imports System Imports System.Collections.Generic Public Class Example     Public Shared Sub Main()          Dim openWith As New SortedDictionary(Of String, String)         openWith.Add("A", "a")         openWith.Add("B", "b")         openWith.Add("C", "c")         openWith.Add("D", "d")         Console.WriteLine("For key = ""rtf"", value = {0}.",openWith("rtf"))     End Sub End Class