Table of Contents

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

min decimal

A decimal that is the minimum value.

max decimal

A decimal that is the maximum value.

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

min double

A double that is the minimum value.

max double

A double that is the maximum value.

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

min int

An int that is the minimum value.

max int

An int that is the maximum value.

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

min long

An long that is the minimum value.

max long

An long that is the maximum value.

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

min float

A float that is the minimum value.

max float

A float that is the maximum value.

Fields

Default

Specifies the default value for the RangeAttribute. This field is read-only.

public static readonly RangeAttribute Default

Field Value

RangeAttribute

Properties

Maximum

Gets the maximum value of the property this attribute is bound to.

public decimal Maximum { get; }

Property Value

decimal

Minimum

Gets the minimum value of the property this attribute is bound to.

public decimal Minimum { get; }

Property Value

decimal