Skip to content

AcceptableValueRange<T> Class

Specify the range of acceptable values for a setting.

C#
public class AcceptableValueRange<T> : AcceptableValueBase where T : IComparable

T

Inheritance objectAcceptableValueBase

C#
public AcceptableValueRange(T minValue, T maxValue)

minValue T
Lowest acceptable value

maxValue T
Highest acceptable value

Lowest acceptable value

C#
public virtual T MinValue { get; }

Highest acceptable value

C#
public virtual T MaxValue { get; }

Change the value to be acceptable, if it’s not already.

C#
public override object Clamp(object value)

value object

object

Check if the value is an acceptable value.

C#
public override bool IsValid(object value)

value object

bool

Get the string for use in config files.

C#
public override string ToDescriptionString()

string