I am trying to confirm whether a specific dictionary key contains a value
e.g.
does dict01 contain the phrase “testing” in the “tester” key
At the moment I am having to iterate through the dictionary using KeyPair, which I don’t want to have to do as it wasting performance
You can use ContainsKey and string.Contains:
You can also use TryGetValue: