PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsLocation­Contract­AttributeCreate­Argument­Out­Of­Range­Exception
Open sandboxFocus

LocationContractAttribute.CreateArgumentOutOfRangeException Method

CreateArgumentOutOfRangeException(Object, String, LocationKind)

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

Declaration
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.