Class RangeAttribute
- Namespace
- Bonsai
- Assembly
- Bonsai.Core.dll
Specifies the valid range of values for a numeric property.
[AttributeUsage(AttributeTargets.Property)]
public sealed class RangeAttribute : Attribute, _Attribute
- Inheritance
-
RangeAttribute
- Implements
- Inherited Members
Constructors
RangeAttribute(decimal, decimal)
Initializes a new instance of the RangeAttribute class with the specified minimum and maximum values.
public RangeAttribute(decimal min, decimal max)
Parameters
RangeAttribute(double, double)
Initializes a new instance of the RangeAttribute class with the specified minimum and maximum values.
public RangeAttribute(double min, double max)
Parameters
RangeAttribute(int, int)
Initializes a new instance of the RangeAttribute class with the specified minimum and maximum values.
public RangeAttribute(int min, int max)
Parameters
RangeAttribute(long, long)
Initializes a new instance of the RangeAttribute class with the specified minimum and maximum values.
public RangeAttribute(long min, long max)
Parameters
RangeAttribute(float, float)
Initializes a new instance of the RangeAttribute class with the specified minimum and maximum values.
public RangeAttribute(float min, float max)
Parameters
Fields
Default
Specifies the default value for the RangeAttribute. This field is read-only.
public static readonly RangeAttribute Default
Field Value
Properties
Maximum
Gets the maximum value of the property this attribute is bound to.
public decimal Maximum { get; }
Property Value
Minimum
Gets the minimum value of the property this attribute is bound to.
public decimal Minimum { get; }