Open sandboxFocus

Method CreateArgumentOutOfRangeException

CreateArgumentOutOfRangeException(object, string, LocationKind)

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

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

Value assigned to the location.

string locationName

Name of the location.

LocationKind locationKind

Location kind.

Returns
Type Description
ArgumentOutOfRangeException

A new ArgumentOutOfRangeException where the message, has been derived from ErrorMessage, with placeholders replaced by their concrete value.