Open sandboxFocus

Method CreateArgumentNullException

CreateArgumentNullException(object, string, LocationKind)

Creates an ArgumentNullException with an error message formatted from ErrorMessage and given concrete values.

Declaration
[Obsolete("Use ContractServices.ExceptionFactory.CreateException().")]
protected ArgumentNullException CreateArgumentNullException(object value, string locationName, LocationKind locationKind)
Parameters
Type Name Description
object value

The value assigned to the location.

string locationName

The name of the location.

LocationKind locationKind

The kind of the location.

Returns
Type Description
ArgumentNullException

A new ArgumentNullException whose message is derived from ErrorMessage, with placeholders replaced by their concrete values.