Is approach below thread safe? I know ConcurrentDictionary provides TryRemove method but I just don't like to have a variable for value that I never gonna use.
ConcurrentDictionary<int, int> myDict = new ConcurrentDictionary<int, int>();
if (myDict.ContainsKey(1))
((IDictionary<int, int>)myDict).Remove(1);