12 [__DynamicallyInvokable]
23 [__DynamicallyInvokable]
26 [__DynamicallyInvokable]
29 if (m_encoding ==
null)
31 m_encoding =
new UnicodeEncoding(bigEndian:
false, byteOrderMark:
false);
38 [__DynamicallyInvokable]
46 [__DynamicallyInvokable]
56 [__DynamicallyInvokable]
67 [__DynamicallyInvokable]
69 : base(formatProvider)
88 [__DynamicallyInvokable]
89 protected override void Dispose(
bool disposing)
92 base.Dispose(disposing);
97 [__DynamicallyInvokable]
106 [__DynamicallyInvokable]
107 public override void Write(
char value)
111 __Error.WriterClosed();
126 [__DynamicallyInvokable]
127 public override void Write(
char[] buffer,
int index,
int count)
141 if (buffer.Length - index < count)
147 __Error.WriterClosed();
149 _sb.
Append(buffer, index, count);
155 [__DynamicallyInvokable]
156 public override void Write(
string value)
160 __Error.WriterClosed();
174 [__DynamicallyInvokable]
175 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
188 [__DynamicallyInvokable]
189 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
209 [__DynamicallyInvokable]
210 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
213 Write(buffer, index, count);
223 [__DynamicallyInvokable]
224 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
237 [__DynamicallyInvokable]
238 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
258 [__DynamicallyInvokable]
259 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
269 [__DynamicallyInvokable]
270 [HostProtection(
SecurityAction.LinkDemand, ExternalThreading =
true)]
278 [__DynamicallyInvokable]
Represents a character encoding.To browse the .NET Framework source code for this type,...
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
override Task WriteLineAsync(char[] buffer, int index, int count)
Writes a subarray of characters followed by a line terminator asynchronously to the string.
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
Implements a T:System.IO.TextWriter for writing information to a string. The information is stored in...
override Task WriteAsync(char[] buffer, int index, int count)
Writes a subarray of characters to the string asynchronously.
override Task WriteLineAsync(char value)
Writes a character followed by a line terminator asynchronously to the string.
The exception that is thrown when the value of an argument is outside the allowable range of values a...
override void Write(char value)
Writes a character to the string.
void Dispose()
Releases all resources used by the T:System.IO.TextWriter object.
StringWriter(IFormatProvider formatProvider)
Initializes a new instance of the T:System.IO.StringWriter class with the specified format control.
override Task FlushAsync()
Asynchronously clears all buffers for the current writer and causes any buffered data to be written t...
StringWriter()
Initializes a new instance of the T:System.IO.StringWriter class.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
override string ToString()
Returns a string containing the characters written to the current StringWriter so far.
Represents a UTF-16 encoding of Unicode characters.
Represents a writer that can write a sequential series of characters. This class is abstract.
override Task WriteAsync(char value)
Writes a character to the string asynchronously.
override void Dispose(bool disposing)
Releases the unmanaged resources used by the T:System.IO.StringWriter and optionally releases the man...
static Task CompletedTask
Gets a task that has already completed successfully.
override Task WriteLineAsync(string value)
Writes a string followed by a line terminator asynchronously to the current string.
StringWriter(StringBuilder sb, IFormatProvider formatProvider)
Initializes a new instance of the T:System.IO.StringWriter class that writes to the specified T:Syste...
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
The exception that is thrown when one of the arguments provided to a method is not valid.
StringWriter(StringBuilder sb)
Initializes a new instance of the T:System.IO.StringWriter class that writes to the specified T:Syste...
virtual StringBuilder GetStringBuilder()
Returns the underlying T:System.Text.StringBuilder.
Specifies that the class can be serialized.
override void Write(string value)
Writes a string to the current string.
virtual void WriteLine()
Writes a line terminator to the text string or stream.
override void Write(char[] buffer, int index, int count)
Writes a subarray of characters to the string.
Compare strings using culture-sensitive sort rules and the current culture.
override void Close()
Closes the current T:System.IO.StringWriter and the underlying stream.
override Task WriteAsync(string value)
Writes a string to the current string asynchronously.
Provides information about a specific culture (called a locale for unmanaged code development)....
Represents an asynchronous operation that can return a value.