You can use ContainsKey and string.Contains :
var key = "tester"; var val = "testing"; if(myDictionary.ContainsKey(key) && myDictionary[key].Contains(val)) { // "tester" key exists and contains "testing" value }
You can also use TryGetValue :
var key = "tester"; var val = "testing"; var dicVal = string.Empty; if(myDictionary.TryGetValue(key, out dicVal) && dicVal.contains(val)) {
source share