Mega Code Archive

 
Categories / VB.Net / Data Structure
 

Searches for a value

Imports System Imports System.Collections Imports System.Collections.Specialized Public Class SamplesStringDictionary    Public Shared Sub Main()       Dim myCol As New StringDictionary()       myCol.Add("red", "R")       myCol.Add("green", "G")       myCol.Add("blue", "B")       If myCol.ContainsValue("R") Then          Console.WriteLine("The collection contains the value ""R"".")       Else          Console.WriteLine("The collection does not contain the value ""R"".")       End If       Console.WriteLine()    End Sub  End Class