Partilhar via


VsTextViewClass.GetSelectedText(String) Method

Definition

Returns a copy of the selected text.

public:
 virtual int GetSelectedText([Runtime::InteropServices::Out] System::String ^ % pbstrText) = Microsoft::VisualStudio::TextManager::Interop::IVsTextView::GetSelectedText;
public:
 virtual int GetSelectedText([Runtime::InteropServices::Out] System::String ^ % pbstrText);
 virtual int GetSelectedText([Runtime::InteropServices::Out] std::wstring const & & pbstrText);
public virtual int GetSelectedText (out string pbstrText);
abstract member GetSelectedText : string -> int
override this.GetSelectedText : string -> int
Public Overridable Function GetSelectedText (ByRef pbstrText As String) As Integer

Parameters

pbstrText
String

[out] If the method succeeds, specifies a pointer to a string containing the text.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Applies to