Home Bound Struct
Bound Struct
Cancel

Bound Struct

Namespace: Json.Schema.DataGeneration

Inheritance: Bound 🡒 ValueType 🡒 object

Implemented interfaces:

  • IComparable<Bound>
  • IEquatable<Bound>

Describes a lower or upper bound to a Json.Schema.DataGeneration.NumberRange.

Properties

NameTypeSummary
InclusiveboolGets whether the value is included in the bound.
ValuedecimalGets the bound value.

Constructors

Bound(decimal value, bool inclusive)

Creates a new Json.Schema.DataGeneration.Bound.

Declaration

1
public Bound(decimal value, bool inclusive)
ParameterTypeDescription
valuedecimalThe value
inclusiveboolWhether the value is included. Default is true.

Methods

CompareTo(Bound other)

Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances.

Declaration

1
public int CompareTo(Bound other)

Returns

Complement(Bound b)

Identifies the complement of a bound, which is the same value and inverted inclusivity.

Declaration

1
public static Bound Complement(Bound b)

Returns

Equals(object obj)

Indicates whether this instance and a specified object are equal.

Declaration

1
public override bool Equals(object obj)
ParameterTypeDescription
objobjectThe object to compare with the current instance.

Returns

true ifobj and this instance are the same type and represent the same value; otherwise, false.

Equals(Bound other)

Indicates whether the current object is equal to another object of the same type.

Declaration

1
public bool Equals(Bound other)
ParameterTypeDescription
otherBoundAn object to compare with this object.

Returns

true if the current object is equal to theother parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

Declaration

1
public override int GetHashCode()

Returns

A 32-bit signed integer that is the hash code for this instance.

Maximum(Bound a, Bound b)

Identifies the maximum of two bounds, including their inclusivity.

Declaration

1
public static Bound Maximum(Bound a, Bound b)

Returns

Minimum(Bound a, Bound b)

Identifies the minimum of two bounds, including their inclusivity.

Declaration

1
public static Bound Minimum(Bound a, Bound b)

Returns

Contents