PostSharp / / API Reference / Post­Sharp.​Patterns.​Contracts / Negative­Attribute
Open sandbox

Class NegativeAttribute

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

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

Constructors

Name Description
NegativeAttribute()

Initializes a new NegativeAttribute.