FloatingPointNumberPart<T> Class
Represents a floating point numeric part that uses a format for text conversion and supports spinning.
public class FloatingPointNumberPart<T> : NumberPart<T>, ISpinnablePart<T?>, IPart where T : struct, IFloatingPoint<T>, IMinMaxValue<T>
- Type Parameters:
-
T-The part value type.
- Inheritance:
- object PartBase<T?> FormattedPartBase<T?> NumberPartBase<T> NumberPart<T> object
- Derived:
- FloatingPointIeee754NumberPart<T>
- Implements:
- ISpinnablePart<T?> IPart
Constructors
FloatingPointNumberPart(string?)
Initializes an instance of the class.
public FloatingPointNumberPart(string? format = null)
| Parameter | Type | Description |
|---|---|---|
| format | string | The numeric or composite format. |
See Also
- NumberPart<T>
Methods
IncrementValue(T, T, bool, T, T, SpinWrapping, int, bool)
Increments a value.
protected override T IncrementValue(T value, T delta, bool isIncreasing, T minimum, T maximum, SpinWrapping spinWrapping, int roundingDecimalPlace, bool canSnapToChangePrecision)
| Parameter | Type | Description |
|---|---|---|
| value | T | The current value. |
| delta | T | The value of the incremental change. |
| isIncreasing | bool |
|
| minimum | T | The minimum allowed value. |
| maximum | T | The maximum allowed value. |
| spinWrapping | SpinWrapping | The wrapping behavior used when spinning past a minimum or maximum value. |
| roundingDecimalPlace | int | (For floating point numbers only) The rounding decimal place. Pass a negative number to disable rounding. |
| canSnapToChangePrecision | bool | (For floating point numbers only) Whether the value should be snapped to the precision of the incremental change value prior to applying the increment. |
Returns
- T:
The incremented value.
See Also
- NumberPart<T>
Inherited Members
- NumberPartBase<T>.TryParseText(IList<IPart>, string, int, CultureInfo, out int)
- NumberPartBase<T>.DefaultLargeChange
- NumberPartBase<T>.DefaultSmallChange
- NumberPartBase<T>.IsComposited
- NumberPartBase<T>.MaximumValue
- NumberPartBase<T>.MinimumValue
- FormattedPartBase<T?>.CoerceFormat(string)
- FormattedPartBase<T?>.IsTextInputAllowed(string, int, CultureInfo)
- FormattedPartBase<T?>.OnFormatChanged()
- FormattedPartBase<T?>.ToString()
- FormattedPartBase<T?>.Format
- PartBase<T?>.IsEditable
- PartBase<T?>.IsLiteral
- PartBase<T?>.IsOptional
- PartBase<T?>.Length
- PartBase<T?>.StartOffset
- PartBase<T?>.StringValue
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Extension Methods
- ObjectExtensions.TryConvertToDouble(object, out double)
- ObjectExtensions.TryConvertToDouble(object, IFormatProvider, out double)
See Also
- NumberPart<T>