Open sandboxFocus

Method CreateArgumentException

CreateArgumentException(object, string, LocationKind)

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

Declaration
[Obsolete("Use ContractServices.ExceptionFactory.CreateException().")]
protected ArgumentException CreateArgumentException(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
ArgumentException

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