Dictionary classes are a very important class, especially for simple storage, querying, and processing of data.
Don't say much nonsense, simply record the results of my exploration.
1.
The dictionary internal index is 0-based. This means that the ordinal of the first element is 0.
2.
1 Public ClassDictionarytrymain2 3 Private SubBtnclassbase_click (ByValSender asSystem.Object,ByValE asSystem.EventArgs)HandlesBtnclassbase.click4 DimDictest as NewDictionary ( of String,String)5Dictest.add (" Age"," -")6Dictest.add (" Love","MJ, CM, VB,. NET")7Dictest.add ("Music","Michael Jackson")8Dictest.add (" Fun","Computer Programming")9Dictest.add ("Loc","Hubei Wuhan")TenConsole.WriteLine (String. Format ("Length of Dictionary:{0}", Dictest.count)) OneConsole.WriteLine (String. Format ("Exist Key ("Age")? ={0}", Dictest.containskey (" Age"))) AConsole.WriteLine (String. Format ("Content of Key "age" ": {0}", Dictest.item (" Age"))) - End Sub - End Class
[VB.net] Dictionary class