Source.GetText Method

Gets all of the text of the source file.

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

Syntax

'宣言
Public Function GetText As String
'使用
Dim instance As Source
Dim returnValue As String

returnValue = instance.GetText()
public string GetText()
public:
String^ GetText()
public function GetText() : String

Return Value

Type: System.String

The entire source file.

Remarks

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.

Permissions

See Also

Reference

Source Class

Source Members

GetText Overload

Microsoft.VisualStudio.Package Namespace