How to Create Dictionary in Vb.Net

  • How to Create Dictionary in Vb.Net

  • 2 Comments sorted by

  • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim dic As New Dictionary(Of String, Integer)
    dic.Add("Faraz", 1)
    dic.Add("Shahan", 2)

    If dic.ContainsKey("Faraz") Then
    End If
    End Sub
  • You have to be aware that there are multiple dictonaries classes you can use beside Dictionary.For example:ListDictionary,StringDictionary,SortedDictionary.They provide fast lookup.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week