Compartilhar via


VsTextBufferClass.GetLineText(Int32, Int32, Int32, Int32, String) Method

Definition

Returns the specified span of text in a BSTR.

public:
 virtual int GetLineText(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, [Runtime::InteropServices::Out] System::String ^ % pbstrBuf) = Microsoft::VisualStudio::TextManager::Interop::IVsTextLines::GetLineText;
public:
 virtual int GetLineText(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, [Runtime::InteropServices::Out] System::String ^ % pbstrBuf);
 virtual int GetLineText(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, [Runtime::InteropServices::Out] std::wstring const & & pbstrBuf);
public virtual int GetLineText (int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, out string pbstrBuf);
abstract member GetLineText : int * int * int * int * string -> int
override this.GetLineText : int * int * int * int * string -> int
Public Overridable Function GetLineText (iStartLine As Integer, iStartIndex As Integer, iEndLine As Integer, iEndIndex As Integer, ByRef pbstrBuf As String) As Integer

Parameters

iStartLine
Int32

[in] Starting line.

iStartIndex
Int32

[in] Starting character index within the line. This value must be less than or equal to the length of the line.

iEndLine
Int32

[in] Ending line.

iEndIndex
Int32

[in] Ending character index within the line. This value must be less than or equal to the length of the line.

pbstrBuf
String

[out] Text to insert, if any.

Returns

If the method succeeds, returns S_OK; otherwise, returns an error code.

Implements

Applies to