CharacterRange Structure

 

Specifies a range of character positions within a string.

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

[<Sealed>]
type CharacterRange = struct end

NameDescription
System_CAPS_pubmethodCharacterRange(Int32, Int32)

Initializes a new instance of the CharacterRange structure, specifying a range of character positions within a string.

NameDescription
System_CAPS_pubpropertyFirst

Gets or sets the position in the string of the first character of this CharacterRange.

System_CAPS_pubpropertyLength

Gets or sets the number of positions in this CharacterRange.

NameDescription
System_CAPS_pubmethodEquals(Object)

Gets a value indicating whether this object is equivalent to the specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the fully qualified type name of this instance.(Inherited from ValueType.)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(CharacterRange, CharacterRange)

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

System_CAPS_puboperatorSystem_CAPS_staticInequality(CharacterRange, CharacterRange)

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

The following code example demonstrates how to create a CharacterRange and use it to highlight part of a string. This example is designed to be used with Windows Forms. Paste the example into a form and call the HighlightACharacterRange method when handling the form's Paint event, passing e as PaintEventArgs.

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

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: