Represents the exception that is thrown when a null argument passed to a method that does not accept it.
Object
Exception
SystemException
ArgumentException
ArgumentNullException
[Visual Basic] Public Class ArgumentNullException Inherits ArgumentException [C#] public class ArgumentNullException : ArgumentException [C++] public __gc class ArgumentNullException : public ArgumentException [JScript] public class ArgumentNullException extends ArgumentException
ArgumentNullException is thrown when a method is invoked with a null argument and the contract of the method does not allow that argument to be null. Ideally it should carry a meaningful error message describing which argument is invalid and the expected values of that argument.
Namespace: System
Assembly: mscorlib.dll