Share via


ITextRangeProvider.Compare Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns a value that indicates whether the span (the Start endpoint through the End endpoint) of a text range is the same as another text range.

Namespace:  System.Windows.Automation.Provider
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Function Compare ( _
    range As ITextRangeProvider _
) As Boolean
bool Compare(
    ITextRangeProvider range
)

Parameters

Return Value

Type: System.Boolean
true if the span of both text ranges is identical; otherwise, false.

Exceptions

Exception Condition
ArgumentException

The range to compare does not come from the same text provider.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.