TextImageExtensions.GetText Method

Definition

Overloads

GetText(ITextImage)

Gets all the text in the image.

GetText(ITextImage, Int32, Int32)

Gets text from the image starting at startIndex and having length equal to length.

GetText(ITextImage)

Gets all the text in the image.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetText(Microsoft::VisualStudio::Text::ITextImage ^ image);
public static string GetText (this Microsoft.VisualStudio.Text.ITextImage image);
static member GetText : Microsoft.VisualStudio.Text.ITextImage -> string
<Extension()>
Public Function GetText (image As ITextImage) As String

Parameters

image
ITextImage

Returns

A non-null string.

Remarks

Caveat emptor. Calling GetText() on a 100MB ITextImage will give you exactly what you asked for, which probably isn't what you wanted.

Applies to

GetText(ITextImage, Int32, Int32)

Gets text from the image starting at startIndex and having length equal to length.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ GetText(Microsoft::VisualStudio::Text::ITextImage ^ image, int startIndex, int length);
public static string GetText (this Microsoft.VisualStudio.Text.ITextImage image, int startIndex, int length);
static member GetText : Microsoft.VisualStudio.Text.ITextImage * int * int -> string
<Extension()>
Public Function GetText (image As ITextImage, startIndex As Integer, length As Integer) As String

Parameters

image
ITextImage

Text source.

startIndex
Int32

The starting index.

length
Int32

The length of text to get.

Returns

The string of length length starting at startIndex in the underlying ITextBuffer.

Exceptions

startIndex is less than zero or greater than the length of the image, or length is less than zero, or startIndex plus length is greater than the length of the image.

Applies to