How to check if the Dictionary contains a given value?

How do I check if a value exists in Dictionary(Of int, String)

?

Let's say I have [{1, 'One'};{2, 'Two'};{3, 'Three'}]

how to check if "Two" exists?

+3


source to share


1 answer


You can use ContainsValue

:

If myDictionary.ContainsValue("Two") Then
    debug.print("Exists")
End If

      



That's all you need.

+12


source







All Articles