TextBuffer.setText(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the content of the TextBuffer object to the specified string, overwriting any existing content.
public:
virtual void setText(System::String ^ _string);
public virtual void setText (string _string);
abstract member setText : string -> unit
override this.setText : string -> unit
Public Overridable Sub setText (_string As String)
Parameters
- _string
- String
A string that contains the new text for the TextBuffer object.
Remarks
If the TextBuffer object contains any content, it is overwritten by the new content.
The following example demonstrates the setText method.
{
TextBuffer txtb = new TextBuffer();
txtb.setText("This is the first text.");
// Now txtb contains exactly that text.
}