Is there a way to remove an entry from a Dictionary
(by Key
) AND retrieve it\'s Value
in \"the same step?\"
For example, I\'m
Starting with .NET Core 2.0, we have:
public bool Remove (TKey key, out TValue value);
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.remove?view=netcore-2.0#System_Collections_Generic_Dictionary_2_Remove__0__1__
Note this API hasn't been included in .NET Standard 2.0 and .NET Framework 4.7.