IPersistentSpan::TryGetStartLineIndex Method (Int32, Int32)
Gets the starting point of the span as a line number and offset from the start of the line./// </summary>/// <para> </para>/// </remarks>
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
bool TryGetStartLineIndex( [OutAttribute] int% startLine, [OutAttribute] int% startIndex )
Parameters
- startLine
-
Type:
System::Int32
[out] The line number of the start point.
- startIndex
-
Type:
System::Int32
[out] The offset from the start of the line that contains the start point.
Return Value
Type: System::BooleanTrue 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 TryGetEndLineIndex) before using TryGetSpan.