Udostępnij za pośrednictwem


Metoda Source.SetText — (String)

Zastępuje zawartość źródła danego tekstu.

Przestrzeń nazw:  Microsoft.VisualStudio.Package
Zestawy:   Microsoft.VisualStudio.Package.LanguageService.10.0 (w Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (w Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (w Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (w Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Składnia

'Deklaracja
Public Sub SetText ( _
    newText As String _
)
public void SetText(
    string newText
)

Parametry

Uwagi

Ta metoda wymaga GetLastLineIndex Pobierz ostatnią linię, a następnie wywołania metody ReplaceLines metodę, aby zamienić wszystkie wiersze z nowym tekstem.

Tej metody można zgłosić wyjątek, jeśli wystąpił błąd.

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

Source Klasa

Przeciążenie SetText

Przestrzeń nazw Microsoft.VisualStudio.Package