GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfNumberRange Struct

    Namespace:
    GemBox.Pdf
    Assembly:
    GemBox.Pdf.dll

    Represents a range of numbers.

    • C#
    • VB.NET
    public readonly struct PdfNumberRange : IEquatable<PdfNumberRange>, IComparable<Double>
    Public Structure PdfNumberRange
        Implements IEquatable(Of PdfNumberRange), IComparable(Of Double)
    Implements
    System.IEquatable<PdfNumberRange>
    System.IComparable<System.Double>
    Remarks
    note

    A range of numbers might be specified in the reversed order. In that case First is greater than Last. This is usually used when a PdfNumberRange is used to specify interpolation bounds of an interpolation that inverts a value. This is also the reason why properties First and Last are not named Min and Max (Min would be greater than Max, which is confusing).

    Constructors

    PdfNumberRange(Double, Double)

    Initializes a new instance of the PdfNumberRange structure.

    • C#
    • VB.NET
    public PdfNumberRange(double first, double last)
    Public Sub New(first As Double, last As Double)
    Parameters
    first
    System.Double

    The first number of the new PdfNumberRange structure.

    last
    System.Double

    The last number of the new PdfNumberRange structure.

    Exceptions
    System.ArgumentException

    first or last is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    Properties

    First

    Gets the first number in the range.

    • C#
    • VB.NET
    public readonly double First { get; }
    Public ReadOnly Property First As Double
    Property Value
    System.Double

    The first number in the range.

    Last

    Gets the last number in the range.

    • C#
    • VB.NET
    public readonly double Last { get; }
    Public ReadOnly Property Last As Double
    Property Value
    System.Double

    The last number in the range.

    Methods

    CompareTo(Double)

    Returns 0 if a specified System.Double is between the First and the Last, -1 if it is less than the First, or 1 if it is greater than the Last. This method is applicable only if the First is less than or equal to the Last.

    • C#
    • VB.NET
    public readonly int CompareTo(double other)
    Public Function CompareTo(other As Double) As Integer
    Parameters
    other
    System.Double

    A System.Double to compare.

    Returns
    System.Int32

    A signed number indicating the relative order of this instance and other.

    Equals(PdfNumberRange)

    Determines whether the other PdfNumberRange is equal to this PdfNumberRange instance.

    • C#
    • VB.NET
    public readonly bool Equals(PdfNumberRange other)
    Public Function Equals(other As PdfNumberRange) As Boolean
    Parameters
    other
    PdfNumberRange

    The other number range to compare with this number range instance.

    Returns
    System.Boolean

    true if the other PdfNumberRange is equal to this PdfNumberRange instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this PdfNumberRange instance.

    • C#
    • VB.NET
    public override readonly bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this number range instance.

    Returns
    System.Boolean

    true if the specified System.Object is a PdfNumberRange and is equal to this PdfNumberRange instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfNumberRange instance.

    • C#
    • VB.NET
    public override readonly int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this PdfNumberRange instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfNumberRange instance.

    • C#
    • VB.NET
    public override readonly string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfNumberRange instance.

    Overrides
    System.ValueType.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Operators

    Equality(PdfNumberRange, PdfNumberRange)

    Determines whether first and second PdfNumberRanges are equal.

    • C#
    • VB.NET
    public static bool operator ==(PdfNumberRange first, PdfNumberRange second)
    Public Shared Operator =(first As PdfNumberRange, second As PdfNumberRange) As Boolean
    Parameters
    first
    PdfNumberRange

    The first number range.

    second
    PdfNumberRange

    The second number range.

    Returns
    System.Boolean

    true if first and second number ranges are equal; otherwise, false.

    Inequality(PdfNumberRange, PdfNumberRange)

    Determines whether first and second PdfNumberRanges are not equal.

    • C#
    • VB.NET
    public static bool operator !=(PdfNumberRange first, PdfNumberRange second)
    Public Shared Operator <>(first As PdfNumberRange, second As PdfNumberRange) As Boolean
    Parameters
    first
    PdfNumberRange

    The first number range.

    second
    PdfNumberRange

    The second number range.

    Returns
    System.Boolean

    true if first and second number ranges are not equal; otherwise, false.

    Implements

    System.IEquatable<T>
    System.IComparable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.