Why does Dictionary.ContainsKey throw ArgumentNullException?
.net, c#, exception, idictionary
Solution
If `ContainsKey(null)` returned `false` it would give the misleading impression that null keys are allowed..
Problem
The documentation states that `bool Dictionary<TKey, TValue>.ContainsKey(TKey key)` throws an exception in case a null key is passed. Could anyone give a reason for that? Wouldn't it be more practical if it just returned `false`?