PostSharp//API Reference/Post­Sharp.​Patterns.​Contracts/Positive­Attribute
Open sandboxFocus

Class PositiveAttribute

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

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

Constructors

Name Description
PositiveAttribute()

Initializes a new PositiveAttribute.