Skip to content

Instantly share code, notes, and snippets.

@IngIeoAndSpare
Created April 10, 2019 04:52
Show Gist options
  • Save IngIeoAndSpare/e9125a6a33abafa370e9e24831292a9d to your computer and use it in GitHub Desktop.
Save IngIeoAndSpare/e9125a6a33abafa370e9e24831292a9d to your computer and use it in GitHub Desktop.
get item from ConcurrentDictionary
private string getValueFromDict(ConcurrentDictionary<string, ConcurrentDictionary<string, string>> source, string keyValue, string subKeyValue)
{
string result = null;
ConcurrentDictionary<string, string> sourceValueObject;
source.TryGetValue(keyValue, out sourceValueObject);
sourceValueObject.TryGetValue(subKeyValue, out result);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment