Table of Contents

Class ArgumentNullException

Namespace
System
Assembly
mscorlib.dll

The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

public class ArgumentNullException : ArgumentException
Inheritance
ArgumentNullException
Inherited Members
Extension Methods

Constructors

ArgumentNullException()

Initializes a new instance of the ArgumentNullException class.

public ArgumentNullException()

ArgumentNullException(string)

Initializes a new instance of the ArgumentNullException class with the name of the parameter that causes this exception.

public ArgumentNullException(string argument)

Parameters

argument string

The name of the parameter that caused the exception.

ArgumentNullException(string, string)

Initializes an instance of the ArgumentNullException class with a specified error message and the name of the parameter that causes this exception.

public ArgumentNullException(string paramName, string message)

Parameters

paramName string

The name of the parameter that caused the exception.

message string

A message that describes the error.