NonNegativeValueAttribute Class
Indicates that the integral value never falls below zero.
Namespace:
RingSoft.DataEntryControls.Engine.AnnotationsAssembly: RingSoft.DataEntryControls.Engine (in RingSoft.DataEntryControls.Engine.dll)
Syntax
[AttributeUsageAttribute] public sealed class NonNegativeValueAttribute : Attribute
<AttributeUsageAttribute> _ Public NotInheritable Class NonNegativeValueAttribute _ Inherits Attribute
[AttributeUsageAttribute] public ref class NonNegativeValueAttribute sealed : public Attribute
Examples
C#
void Foo([NonNegativeValue] int value) { if (value == -1) { // Warning: Expression is always 'false' ... } }