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
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.