ArgumentNullException - key is null.
Then, in the remarks...
Implementations can vary in whether they allow key to be null.
So, I have to wonder... is this an error or something I'm just missing here? The MSDN help file seems a bit contradictory.
What the documentation says is "If you get ArgumentNullException
, then key was null".
It does not say "If key is null, you get an ArgumentNullException
." That would be an converse logic fallacy.
The complete condition would be:
"If and only if both key is null and the container does not support null keys, you get an ArgumentNullException
."