What is ArgumentNullException
When a null reference (Visual Basic for Nothing
) is transmitted to the initiator does not accept it as abnormal effective method parameters.
- inherit
-
ObjectExceptionSystemExceptionArgumentExceptionArgumentNullException
Detailed description
When you call a method, if at least one argument is passed null
null
, an exception is thrown. ArgumentNullException
In two major cases, an exception is thrown at run time, both cases are reflected developer error: ArgumentNullException
-
The non-instantiated objects passed to the method. To prevent this error, instantiate the object.
-
Then, from the method call returns the object passed as a parameter to the second method, but the original value of the returned object
null
. To prevent this error, please check the return valuenull
is, if the return value is notnull
that the second method is called.
ArgumentNullException behaves ArgumentException act the same. This method is provided in order that the application code can be distinguished by null
abnormal and non-null parameter caused by abnormality of a parameter.
HRESULT
ArgumentNullException using E_POINTER value of HRESULT 0x80004003.