Source::SetText Method (String^)

 

Replaces the source contents with the given text.

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

public:
void SetText(
	String^ newText
)

Parameters

newText
Type: System::String^

The new text.

This method calls the GetLastLineIndex method to get the last line and then calls the ReplaceLines method to replace all lines with the new text.

This method can throw an exception if there was an error.

Return to top
Show: