IPersistentSpan::TryGetSpan Method (Span)
Visual Studio 2015
Get the span as a character offset from the start of the buffer./// </summary>/// <param name="span"> </param>/// <returns> </returns>/// <remarks>/// <para> </para>/// </remarks>
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- span
-
Type:
Microsoft.VisualStudio.Text::Span
[out] The corresponding span in the buffer.
Return Value
Type: System::BooleanTrue if the out parameters are valid; false otherwise (in which case either TryGetStartLineIndex or TryGetEndLineIndex 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 only be used if the document was created using the span method of the factory and the document has never been opened after the span was created. In general, you should try to use TryGetStartLineIndex and TryGetEndLineIndex before using this method.
Show: