PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsStrictly­Positive­Attribute
Open sandboxFocus

Class StrictlyPositiveAttribute

Custom attribute that, when added to a field, property or parameter, throws an ArgumentOutOfRangeException if the target is assigned a value smaller than or equal to zero.

Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
public class StrictlyPositiveAttribute : StrictlyGreaterThanAttribute, ILocationLevelAspect, IValidableAnnotation, IAspect

Constructors

Name Description
StrictlyPositiveAttribute()

Initializes a new StrictlyPositiveAttribute.