StringWriter.GetStringBuilder 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.
Returns the underlying StringBuilder.
public:
virtual System::Text::StringBuilder ^ GetStringBuilder();
public virtual System.Text.StringBuilder GetStringBuilder ();
abstract member GetStringBuilder : unit -> System.Text.StringBuilder
override this.GetStringBuilder : unit -> System.Text.StringBuilder
Public Overridable Function GetStringBuilder () As StringBuilder
Returns
The underlying StringBuilder
.
Examples
This code example is part of a larger example provided for the StringWriter() constructor.
// Use the underlying StringBuilder for more complex
// manipulations of the string.
strWriter->GetStringBuilder()->Insert( 0, "Invalid " );
// Use the underlying StringBuilder for more complex
// manipulations of the string.
strWriter.GetStringBuilder().Insert(0, "Invalid ");
' Use the underlying StringBuilder for more complex
' manipulations of the string.
strWriter.GetStringBuilder().Insert(0, "Invalid ")
Remarks
This is either the StringBuilder
that was passed to the constructor, or the StringBuilder
that was automatically created.
The following table lists examples of other typical or related I/O tasks.
To do this... | See the example in this topic... |
---|---|
Create a text file. | How to: Write Text to a File |
Write to a text file. | How to: Write Text to a File |
Read from a text file. | How to: Read Text from a File |
Applies to
See also
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.