RangeAttribute RangeAttribute RangeAttribute RangeAttribute RangeAttribute Class

Definition

Indicates the numeric range constraints for the value of a data field.

public : sealed class RangeAttribute : Attribute
struct winrt::Windows::Foundation::Metadata::RangeAttribute : Attribute
public sealed class RangeAttribute : Attribute
Public NotInheritable Class RangeAttribute Inherits Attribute
var rangeAttribute = new rangeAttribute(minValue, maxValue);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced v1)

Constructors

RangeAttribute(Int32, Int32) RangeAttribute(Int32, Int32) RangeAttribute(Int32, Int32) RangeAttribute(Int32, Int32) RangeAttribute(Int32, Int32)

Creates and initializes a new instance of the attribute with the specified minimum and maximum values.

public : RangeAttribute(int minValue, int maxValue)
RangeAttribute(int32_t minValue, int32_t maxValue) const;
public RangeAttribute(Int32 minValue, Int32 maxValue)
Public Sub New(minValue As Int32, maxValue As Int32)
var rangeAttribute = new rangeAttribute(minValue, maxValue);
Parameters
minValue
Int32 Int32 Int32

The minimum value allowed.

maxValue
Int32 Int32 Int32

The maximum value allowed.

See Also