Condividi tramite


IPersistentSpan.TryGetEndLineIndex(Int32, Int32) Method

Definition

Get the ending point of the span as a line number and offset from the start of the line.

public:
 bool TryGetEndLineIndex([Runtime::InteropServices::Out] int % endLine, [Runtime::InteropServices::Out] int % endIndex);
bool TryGetEndLineIndex([Runtime::InteropServices::Out] int & endLine, [Runtime::InteropServices::Out] int & endIndex);
public bool TryGetEndLineIndex (out int endLine, out int endIndex);
abstract member TryGetEndLineIndex : int * int -> bool
Public Function TryGetEndLineIndex (ByRef endLine As Integer, ByRef endIndex As Integer) As Boolean

Parameters

endLine
Int32

Line number of the end point.

endIndex
Int32

Character offset from the start of the line containing the end point.

Returns

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

Remarks

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(Int32, Int32)) before using TryGetSpan(Span).

Applies to