Source::GetText Method ()

 

Gets all of the text of the source file.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
String^ GetText()

Return Value

Type: System::String^

The entire source file.

Use this method to access the entire source file as a single block of text.

This method calls the GetLastLineIndex method on the IVsTextLines object passed to the Source class constructor, and then returns the result of calling GetText(Int32, Int32, Int32, Int32) with the start and ending location of the source file. This method throws an exception if GetLastLineIndex returns an error.

Return to top
Show: