Struct Range

    Definition

    Namespace:
    Tizen.Multimedia
    Assembly:
    Tizen.Multimedia.dll

    Represents a range(min, max) value.

    public struct Range

    Constructors

    View Source

    Range(int, int)

    Initializes a new instance of the range with the specified values.

    Declaration
    public Range(int min, int max)
    Parameters
    Type Name Description
    int min

    Minimum value of the range.

    int max

    Maximum value of the range.

    Exceptions
    Type Condition
    System.ArgumentException

    max is less than min.

    Properties

    View Source

    Length

    Gets the length of the range.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int
    View Source

    Max

    Gets or sets the maximum value of the range.

    Declaration
    public int Max { readonly get; set; }
    Property Value
    Type Description
    int
    View Source

    Min

    Gets or sets the minimum value of the range.

    Declaration
    public int Min { readonly get; set; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Equals(object)

    Compares an object to an instance of Range for equality.

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

    A object to compare.

    Returns
    Type Description
    bool

    true if the two ranges are equal; otherwise, false.

    Overrides
    System.ValueType.Equals(object)
    View Source

    GetHashCode()

    Gets the hash code for this instance of Range.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code for this instance of Range.

    Overrides
    System.ValueType.GetHashCode()
    View Source

    IsInside(int)

    Determines if the specified value is within the range.

    Declaration
    public bool IsInside(int value)
    Parameters
    Type Name Description
    int value

    The value to check.

    Returns
    Type Description
    bool

    true if the value is within the range; otherwise false.

    View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    System.ValueType.ToString()

    Operators

    View Source

    operator ==(Range, Range)

    Compares two instances of Range for equality.

    Declaration
    public static bool operator ==(Range range1, Range range2)
    Parameters
    Type Name Description
    Range range1

    A Range to compare.

    Range range2

    A Range to compare.

    Returns
    Type Description
    bool

    true if the two instances of Range are equal; otherwise false.

    View Source

    operator !=(Range, Range)

    Compares two instances of Range for inequality.

    Declaration
    public static bool operator !=(Range range1, Range range2)
    Parameters
    Type Name Description
    Range range1

    A Range to compare.

    Range range2

    A Range to compare.

    Returns
    Type Description
    bool

    true if the two instances of Range are not equal; otherwise false.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX