Table of Contents

Class ValidationArgValue.Number

Namespace
Trellis
Assembly
Trellis.Core.dll

A numeric operand, written to JSON as a number.

public sealed record ValidationArgValue.Number : ValidationArgValue, IEquatable<ValidationArgValue>, IEquatable<ValidationArgValue.Number>
Inheritance
ValidationArgValue.Number
Implements
Inherited Members
Extension Methods

Remarks

decimal backs every numeric operand rather than a case per CLR numeric type, because JSON has a single number type and a client could not observe the distinction anyway. It is the widest choice that keeps integers exact, which a double would not.

Constructors

Number(decimal)

A numeric operand, written to JSON as a number.

public Number(decimal Value)

Parameters

Value decimal

The number.

Remarks

decimal backs every numeric operand rather than a case per CLR numeric type, because JSON has a single number type and a client could not observe the distinction anyway. It is the widest choice that keeps integers exact, which a double would not.

Properties

Value

The number.

public decimal Value { get; init; }

Property Value

decimal