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
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.