I have some code that uses the GetOrAdd
function from ConcurrentDictionary
to add values with a unique key to a holder. However, I want to be able to tell if a values key is found (i.e. a true
returned from TryGet
) or whether it has to be added.
I haven't been able to find anything online that suggests this is achievable so if anyone has any ideas it would be really helpful.