ValueRangeAttribute Class
Indicates that the integral value falls into the specified interval.
It's allowed to specify multiple non-intersecting intervals.
Values of interval boundaries are inclusive.
Namespace:
RingSoft.DataEntryControls.Engine.AnnotationsAssembly: RingSoft.DataEntryControls.Engine (in RingSoft.DataEntryControls.Engine.dll)
Syntax
[AttributeUsageAttribute] public sealed class ValueRangeAttribute : Attribute
<AttributeUsageAttribute> _ Public NotInheritable Class ValueRangeAttribute _ Inherits Attribute
[AttributeUsageAttribute] public ref class ValueRangeAttribute sealed : public Attribute
Examples
C#
void Foo([ValueRange(0, 100)] int value) { if (value == -1) { // Warning: Expression is always 'false' ... } }