Class ArgumentNullOrEmptyException
The exception that is thrown when a null reference, or an empty argument, is passed to a method that does not accept it as a valid argument.
Inheritance
Namespace: Umbraco.Core.Exceptions
Assembly: Umbraco.Core.dll
Syntax
[Obsolete("Throw an ArgumentNullException when the parameter is null or an ArgumentException when its empty instead.")]
[Serializable]
public class ArgumentNullOrEmptyException : ArgumentNullException, _Exception, ISerializable
Constructors
View SourceArgumentNullOrEmptyException()
Initializes a new instance of the ArgumentNullOrEmptyException class.
Declaration
public ArgumentNullOrEmptyException()
ArgumentNullOrEmptyException(SerializationInfo, StreamingContext)
Initializes a new instance of the ArgumentNullOrEmptyException class.
Declaration
protected ArgumentNullOrEmptyException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The object that holds the serialized object data. |
System.Runtime.Serialization.StreamingContext | context | An object that describes the source or destination of the serialized data. |
ArgumentNullOrEmptyException(String)
Initializes a new instance of the ArgumentNullOrEmptyException class with the name of the parameter that caused this exception.
Declaration
public ArgumentNullOrEmptyException(string paramName)
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName | The named of the parameter that caused the exception. |
ArgumentNullOrEmptyException(String, Exception)
Initializes a new instance of the ArgumentNullOrEmptyException class.
Declaration
public ArgumentNullOrEmptyException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for this exception. |
System.Exception | innerException | The exception that is the cause of the current exception, or a null reference (langword_csharp_Nothing in Visual Basic) if no inner exception is specified. |
ArgumentNullOrEmptyException(String, String)
Initializes a new instance of the ArgumentNullOrEmptyException class with a specified error message and the name of the parameter that caused this exception.
Declaration
public ArgumentNullOrEmptyException(string paramName, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | paramName | The named of the parameter that caused the exception. |
System.String | message | A message that describes the error. |