IPersistentSpan::TryGetEndLineIndex Method (Int32, Int32)

Visual Studio 2015
 

Get the ending point of the span as a line number and offset from the start of the line./// </summary>/// <param name="endLine"> </param>/// <param name="endIndex"> </param>/// <returns> </returns>/// <remarks>/// <para> </para>/// </remarks>

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

bool TryGetEndLineIndex(
	[OutAttribute] int% endLine,
	[OutAttribute] int% endIndex
)

Parameters

endLine
Type: System::Int32

[out] The line number of the end point.

endIndex
Type: System::Int32

[out] The offset from the start of the line that contains the end point.

Return Value

Type: System::Boolean

True if the out parameters are valid; false otherwise (in which case TryGetSpan will work).

This method can be used on any span if the underlying document is open. If the underlying document is closed, then this method can be used if either the document was created on the closed document using the line/index method/// of the factory or the document had ever been opened after the span was created. In general, you should try this method (and TryGetStartLineIndex) before using TryGetSpan.

Return to top
Show: