سؤال

التصدي

argumentnllexception - مفتاح فارغ.

بعد ذلك، في التصريحات ...

يمكن أن تختلف عمليات

في ما إذا كانت السماح للمفتاح بأن تكون فارغة.

لذلك، يجب أن أتساءل ... هل هذا خطأ أو أي شيء أفتقده هنا؟يبدو ملف تعليمات MSDN متناقضا بعض الشيء.

هل كانت مفيدة؟

المحلول

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."

نصائح أخرى

The table you're looking at is mapping Outcomes to the Conditions that caused them.

In this case, the exception is caused by a null argument.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top