Get single value from dictionary by key
It really does seem like you’re overcomplicating this issue. You can just use the indexer ([]) of the Dictionary class along with the .ContainsKey() method. If you use something like this: You should achieve the effect that you want.