CharacterRange::Equality Operator (CharacterRange, CharacterRange)

 
equivalentCodeEntityM:System.Drawing.CharacterRange.Equals(System.Drawing.CharacterRange,System.Drawing.CharacterRange)

Compares two CharacterRange objects. Gets a value indicating whether the First and Length values of the two CharacterRange objects are equal.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public:
static bool operator ==(
	CharacterRange cr1,
	CharacterRange cr2
)

Parameters

cr1
Type: System.Drawing::CharacterRange

A CharacterRange to compare for equality.

cr2
Type: System.Drawing::CharacterRange

A CharacterRange to compare for equality.

Return Value

Type: System::Boolean

true to indicate the two CharacterRange objects have the same First and Length values; otherwise, false.

You can also test for equality using the Equals method.

The following example demonstrates how to use the Equality operator. To run this example, paste it into a Windows Form. Handle the form’s Paint event and call the CharacterRangeEquality1 method from the Paint event-handling method, passing e as PaintEventArgs.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: