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

    Show / Hide Table of Contents

    Size Struct

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    A structure used to describe the size of an object.

    • C#
    • VB.NET
    public struct Size : IEquatable<Size>
    Public Structure Size
        Implements IEquatable(Of Size)
    Implements
    System.IEquatable<Size>

    Constructors

    Size(Double, Double)

    Initializes a new instance of the Size struct using the Point measurement unit.

    • C#
    • VB.NET
    public Size(double width, double height)
    Public Sub New(width As Double, height As Double)
    Parameters
    width
    System.Double

    The width in points.

    height
    System.Double

    The height in points.

    Size(Double, Double, LengthUnit)

    Initializes a new instance of the Size struct using the specified measurement unit.

    • C#
    • VB.NET
    public Size(double width, double height, LengthUnit unit)
    Public Sub New(width As Double, height As Double, unit As LengthUnit)
    Parameters
    width
    System.Double

    The width in units specified by unit parameter.

    height
    System.Double

    The height in units specified by unit parameter.

    unit
    LengthUnit

    The measurement unit for width and height.

    Properties

    Height

    Gets the height in points.

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

    The height in points.

    Width

    Gets the width in points.

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

    The width in points.

    Methods

    Equals(Size)

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

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

    The other size to compare with this size instance.

    Returns
    System.Boolean

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

    Equals(Object)

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

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

    The System.Object to compare with this size instance.

    Returns
    System.Boolean

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

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this Size instance.

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

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

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this Size instance.

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

    A System.String that represents this Size instance.

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(Size, Size)

    Determines whether first and second Sizes are equal.

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

    The first size.

    second
    Size

    The second size.

    Returns
    System.Boolean

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

    Inequality(Size, Size)

    Determines whether first and second Sizes are not equal.

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

    The first size.

    second
    Size

    The second size.

    Returns
    System.Boolean

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

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.