Replaces the specified span of source with the given text.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Sub SetText ( _
span As TextSpan, _
newText As String _
)
'使用
Dim instance As Source
Dim span As TextSpan
Dim newText As String
instance.SetText(span, newText)
public void SetText(
TextSpan span,
string newText
)
public:
void SetText(
TextSpan span,
String^ newText
)
public function SetText(
span : TextSpan,
newText : String
)
Parameters
span
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpanA TextSpan object describing the span to replace.
newText
Type: System.StringA string holding the new text.
Remarks
This method forwards the call to the other span-oriented SetText(Int32, Int32, Int32, Int32, String) method.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.