Struct Range
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
Represents a range(min, max) value.
public struct Range
Constructors
View SourceRange(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 |
|
Properties
View SourceLength
Gets the length of the range.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
int |
Max
Gets or sets the maximum value of the range.
Declaration
public int Max { get; set; }
Property Value
Type | Description |
---|---|
int |
Min
Gets or sets the minimum value of the range.
Declaration
public int Min { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceEquals(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
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
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. |
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
Operators
View Sourceoperator ==(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. |
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. |