Pls hep me out regarding this.How to get specific key and values from dictionary using variable

  1. New Dictionary(Of String,Double) from {{“Hyd”,98.50}, {“Bang”,89.54},{“Chen”,34.98}}

  2. Using input dialog box i select city

  3. I got city name by this CityName.ContainsKey(city)

  4. But i unable to get key using this CityName.ContainsValue(city)

CityName(city) will give you value. Hope CityName is the dictionary name

Contains methods will return Booleans

Have a starter here:

YourDictVar.Where(Function (x) x.Value = 34.98).First().Key

It’s working thank u Lakshmi

1 Like

Thank you …Please mark the corresponding thread as solution