Replaces a span of characters with different text. This is equivalent to first deleting the text to be replaced and then inserting the new text.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
- Type: Microsoft.VisualStudio.Text.Span
The span of characters to replace.
- Type: String
The new text.
Return ValueType: Microsoft.VisualStudio.Text.Projection.IProjectionSnapshot
This is a shortcut for creating a new ITextEdit object, using it to replace the text, and then applying it. If the replacement fails on account of a read-only region, the snapshot returned will be the same as the current snapshot of the buffer before the attempted replacement.
- 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.