CharInterval Struct
Stores an interval of characters.
public struct CharInterval
Constructors
CharInterval(char)
Initializes a new instance of the CharInterval class.
public CharInterval(char ch)
| Parameter | Type | Description |
|---|---|---|
| ch | char | The character in the interval. |
CharInterval(char, char)
Initializes a new instance of the CharInterval class.
public CharInterval(char start, char end)
| Parameter | Type | Description |
|---|---|---|
| start | char | The start character in the interval. |
| end | char | The end character in the interval. |
Properties
Count
Gets the number of characters contained in interval.
End
Gets or sets the end character in the interval of this CharInterval.
public char End { get; set; }
Property Value
- char:
The end character in the interval of this CharInterval.
Start
Gets or sets the start character in the interval of this CharInterval.
public char Start { get; set; }
Property Value
- char:
The start character in the interval of this CharInterval.
Methods
Contains(CharInterval)
Returns whether the specified character interval is contained by the interval.
public bool Contains(CharInterval interval)
| Parameter | Type | Description |
|---|---|---|
| interval | CharInterval | The character interval to test. |
Returns
- bool:
trueif the specified character interval is contained by the interval; otherwise,false.
Contains(char)
Returns whether the specified character is contained by the interval.
public bool Contains(char ch)
| Parameter | Type | Description |
|---|---|---|
| ch | char | The character to test. |
Returns
- bool:
trueif the specified character is contained by the interval; otherwise,false.
Equals(object)
Determines whether the specified Object is equal to the current Object.
public override bool Equals(object obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The |
Returns
- bool:
trueif the specifiedObjectis equal to the currentObject; otherwise,false.
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
- int:
An integer value that specifies a hash value for this object.
GetIntersection(CharInterval)
Creates the intersection of the interval with another CharInterval.
public CharInterval GetIntersection(CharInterval interval)
| Parameter | Type | Description |
|---|---|---|
| interval | CharInterval | The CharInterval used to find the intersection. |
Returns
- CharInterval:
The intersection of the interval with another CharInterval.
IntersectsWith(CharInterval)
Returns whether the specified character interval intersects with the interval.
public bool IntersectsWith(CharInterval interval)
| Parameter | Type | Description |
|---|---|---|
| interval | CharInterval | The character interval to test. |
Returns
- bool:
trueif the specified character interval intersects with the interval; otherwise,false.
ToString()
Converts the object to a String.
Operators
operator ==(CharInterval, CharInterval)
Compares two color objects for equality.
public static bool operator ==(CharInterval left, CharInterval right)
| Parameter | Type | Description |
|---|---|---|
| left | CharInterval | A CharInterval to compare. |
| right | CharInterval | A CharInterval to compare. |
Returns
- bool:
trueif the color values ofleftandrightare equal; otherwise,false.
operator !=(CharInterval, CharInterval)
Compares two color objects for inequality.
public static bool operator !=(CharInterval left, CharInterval right)
| Parameter | Type | Description |
|---|---|---|
| left | CharInterval | A CharInterval to compare. |
| right | CharInterval | A CharInterval to compare. |
Returns
- bool:
trueif the color values ofleftandrightare unequal; otherwise,false.