Struct Range

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.dll
API Level:
3

Represents a range(min, max) value.

C#
Copy
public struct Range

Constructors

View Source

Range(Int32, Int32)

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

Declaration
C#
Copy
public Range(int min, int max)
Parameters
Type Name Description
System.Int32 min

Minimum value of the range.

System.Int32 max

Maximum value of the range.

Exceptions
Type Condition
System.ArgumentException

max is less than min.

API Level: 3

Properties

View Source

Length

Gets the length of the range.

Declaration
C#
Copy
public int Length { get; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

Max

Gets or sets the maximum value of the range.

Declaration
C#
Copy
public int Max { get; set; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

Min

Gets or sets the minimum value of the range.

Declaration
C#
Copy
public int Min { get; set; }
Property Value
Type Description
System.Int32
API Level: 3

Methods

View Source

Equals(Object)

Compares an object to an instance of Range for equality.

Declaration
C#
Copy
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

A System.Object to compare.

Returns
Type Description
System.Boolean

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

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

GetHashCode()

Gets the hash code for this instance of Range.

Declaration
C#
Copy
public override int GetHashCode()
Returns
Type Description
System.Int32

The hash code for this instance of Range.

Overrides
System.ValueType.GetHashCode()
API Level: 3
View Source

IsInside(Int32)

Determines if the specified value is within the range.

Declaration
C#
Copy
public bool IsInside(int value)
Parameters
Type Name Description
System.Int32 value

The value to check.

Returns
Type Description
System.Boolean

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

API Level: 3
View Source

ToString()

Returns a string that represents the current object.

Declaration
C#
Copy
public override string ToString()
Returns
Type Description
System.String

A string that represents the current object.

Overrides
System.ValueType.ToString()
API Level: 3

Operators

View Source

Equality(Range, Range)

Compares two instances of Range for equality.

Declaration
C#
Copy
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
System.Boolean

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

API Level: 3
View Source

Inequality(Range, Range)

Compares two instances of Range for inequality.

Declaration
C#
Copy
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
System.Boolean

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

API Level: 3