Description | |
|
The StringWriter class is descended from the abstract TextWriter class. It allows a string to be written to character by character, or line by line in much the same way as if the string were a text file.
|
|
Syntax | |
|
Constructor Create ; | Constructor Create ( |
FormatProvider : IFormatProvider ); | Constructor Create ( |
Builder : System.Text.StringBuilder ); | Constructor Create ( |
Builder : StringBuilder; FormatProvider : IFormatProvider ); |
|
Methods | |
|
| Close | Closes the StringWriter |
| ToString | Returns the current value of the StringWriter internal string |
| Write | Adds a character or characters to the current string without line termination |
| WriteLine | Adds a line of text with carriage return/line-feed to the current string |
|
|
|
Properties | |
|
Encoding | | System.Text.Encoding | | The encoding in which the output is built |
|
Microsoft MSDN links | |
|
|