In This Article

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.

public int Count { get; }

Property Value

int:

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:

true if 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:

true if 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 Object to compare to the current Object.

Returns

bool:

true if the specified Object is equal to the current Object; 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:

true if the specified character interval intersects with the interval; otherwise, false.

ToString()

Converts the object to a String.

public override string ToString()

Returns

string:

A string whose value represents this object.

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:

true if the color values of left and right are 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:

true if the color values of left and right are unequal; otherwise, false.

Inherited Members