Show / Hide Table of Contents

    Struct Size

    Definition

    Namespace:
    ElmSharp
    Assembly:
    ElmSharp.dll
    API Level:
    preview

    The Size is a struct defining the height and width as a pair of generic type.

    public struct Size : IEquatable<Size>
    Implements
    IEquatable<Size>

    Constructors

    View Source

    Size(Int32, Int32)

    Initializes a new instance of the size structure from specified dimensions.

    Declaration
    public Size(int width, int height)
    Parameters
    Type Name Description
    Int32 width

    The width to set.

    Int32 height

    The height to set.

    API Level: preview

    Fields

    View Source

    Height

    Magnitude along the vertical axis, in platform-specific units.

    Declaration
    public int Height
    Field Value
    Type Description
    Int32
    API Level: preview
    View Source

    Width

    Magnitude along the horizontal axis, in platform-defined units.

    Declaration
    public int Width
    Field Value
    Type Description
    Int32
    API Level: preview

    Methods

    View Source

    Equals(Size)

    Indicates whether this instance and a Size object are equal.

    Declaration
    public bool Equals(Size other)
    Parameters
    Type Name Description
    Size other

    The Size to compare with the current instance.

    Returns
    Type Description
    Boolean

    true if the object and this instance are of the same type and represent the same value, otherwise false.

    API Level: preview
    View Source

    Equals(Object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current instance.

    Returns
    Type Description
    Boolean

    true if the object and this instance are of the same type and represent the same value, otherwise false.

    Overrides
    ValueType.Equals(Object)
    API Level: preview
    View Source

    GetHashCode()

    Gets the hash code.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code.

    Overrides
    ValueType.GetHashCode()
    API Level: preview
    View Source

    ToString()

    A human-readable representation of Size.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The string is formatted as "{{Width={0} Height={1}}}".

    Overrides
    ValueType.ToString()
    API Level: preview

    Operators

    View Source

    Equality(Size, Size)

    Whether both Sizes are equal.

    Declaration
    public static bool operator ==(Size s1, Size s2)
    Parameters
    Type Name Description
    Size s1

    A Size on the left hand side.

    Size s2

    A Size on the right hand side.

    Returns
    Type Description
    Boolean

    True if both Sizes have equal values.

    API Level: preview
    View Source

    Inequality(Size, Size)

    Whether both Sizes are not equal.

    Declaration
    public static bool operator !=(Size s1, Size s2)
    Parameters
    Type Name Description
    Size s1

    A Size on the left hand side.

    Size s2

    A Size on the right hand side.

    Returns
    Type Description
    Boolean

    True if both Sizes do not have equal values.

    API Level: preview

    Implements

    System.IEquatable<T>
    • View Source
    Back to top Copyright © 2016-2022 Samsung
    Generated by DocFX