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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.”