class TextWriter
Represents a writer that can write a sequential series of characters. This class is abstract.
public Encoding Encoding { get; }
When overridden in a derived class, returns the character encoding in which the output is written.
- Returns The character encoding in which the output is written.
public IFormatProvider FormatProvider { get; }
Gets an object that controls formatting.
- Returns An object for a specific culture, or the formatting of the current culture if no other culture is specified.
public string NewLine { get; set; }
Gets or sets the line terminator string used by the current .
- Returns The line terminator string for the current .
public static TextWriter Null
Provides a with no backing store that can be written to, but not read from.
public static TextWriter Synchronized( TextWriter writer )
Creates a thread-safe wrapper around the specified .
writerThe to synchronize.- Returns A thread-safe wrapper.
public void Write( bool value )
Writes the text representation of a value to the text stream.
valueThe value to write.
public void Write( char value )
Writes a character to the text stream.
valueThe character to write to the text stream.
public void Write( char[] buffer )
Writes a character array to the text stream.
bufferThe character array to write to the text stream.
public void Write( char[] buffer, int index, int count )
Writes a subarray of characters to the text stream.
bufferThe character array to write data from.indexThe character position in the buffer at which to start retrieving data.countThe number of characters to write.
public void Write( decimal value )
Writes the text representation of a decimal value to the text stream.
valueThe decimal value to write.
public void Write( double value )
Writes the text representation of an 8-byte floating-point value to the text stream.
valueThe 8-byte floating-point value to write.
public void Write( int value )
Writes the text representation of a 4-byte signed integer to the text stream.
valueThe 4-byte signed integer to write.
public void Write( long value )
Writes the text representation of an 8-byte signed integer to the text stream.
valueThe 8-byte signed integer to write.
public void Write( object value )
Writes the text representation of an object to the text stream by calling the method on that object.
valueThe object to write.
public void Write( float value )
Writes the text representation of a 4-byte floating-point value to the text stream.
valueThe 4-byte floating-point value to write.
public void Write( string value )
Writes a string to the text stream.
valueThe string to write.
public void Write( string format, object arg0 )
Writes a formatted string to the text stream, using the same semantics as the method.
formatA composite format string.arg0The object to format and write.
public void Write( string format, object arg0, object arg1 )
Writes a formatted string to the text stream using the same semantics as the method.
formatA composite format string.arg0The first object to format and write.arg1The second object to format and write.
public void Write( string format, object arg0, object arg1, object arg2 )
Writes a formatted string to the text stream, using the same semantics as the method.
formatA composite format string.arg0The first object to format and write.arg1The second object to format and write.arg2The third object to format and write.
public void Write( string format, object[] arg )
Writes a formatted string to the text stream, using the same semantics as the method.
formatA composite format string.argAn object array that contains zero or more objects to format and write.
public void Write( uint value )
Writes the text representation of a 4-byte unsigned integer to the text stream.
valueThe 4-byte unsigned integer to write.
public void Write( ulong value )
Writes the text representation of an 8-byte unsigned integer to the text stream.
valueThe 8-byte unsigned integer to write.
public Task WriteAsync( char value )
Writes a character to the text stream asynchronously.
valueThe character to write to the text stream.- Returns A task that represents the asynchronous write operation.
public Task WriteAsync( char[] buffer )
Writes a character array to the text stream asynchronously.
bufferThe character array to write to the text stream. If is , nothing is written.- Returns A task that represents the asynchronous write operation.
public Task WriteAsync( char[] buffer, int index, int count )
Writes a subarray of characters to the text stream asynchronously.
bufferThe character array to write data from.indexThe character position in the buffer at which to start retrieving data.countThe number of characters to write.- Returns A task that represents the asynchronous write operation.
public Task WriteAsync( string value )
Writes a string to the text stream asynchronously.
valueThe string to write. If is , nothing is written to the text stream.- Returns A task that represents the asynchronous write operation.
public void WriteLine( bool value )
Writes the text representation of a value to the text stream, followed by a line terminator.
valueThe value to write.
public void WriteLine( char value )
Writes a character to the text stream, followed by a line terminator.
valueThe character to write to the text stream.
public void WriteLine( char[] buffer )
Writes an array of characters to the text stream, followed by a line terminator.
bufferThe character array from which data is read.
public void WriteLine( char[] buffer, int index, int count )
Writes a subarray of characters to the text stream, followed by a line terminator.
bufferThe character array from which data is read.indexThe character position in at which to start reading data.countThe maximum number of characters to write.
public void WriteLine( decimal value )
Writes the text representation of a decimal value to the text stream, followed by a line terminator.
valueThe decimal value to write.
public void WriteLine( double value )
Writes the text representation of a 8-byte floating-point value to the text stream, followed by a line terminator.
valueThe 8-byte floating-point value to write.
public void WriteLine( int value )
Writes the text representation of a 4-byte signed integer to the text stream, followed by a line terminator.
valueThe 4-byte signed integer to write.
public void WriteLine( long value )
Writes the text representation of an 8-byte signed integer to the text stream, followed by a line terminator.
valueThe 8-byte signed integer to write.
public void WriteLine( object value )
Writes the text representation of an object to the text stream, by calling the method on that object, followed by a line terminator.
valueThe object to write. If is , only the line terminator is written.
public void WriteLine( float value )
Writes the text representation of a 4-byte floating-point value to the text stream, followed by a line terminator.
valueThe 4-byte floating-point value to write.
public void WriteLine( string value )
Writes a string to the text stream, followed by a line terminator.
valueThe string to write. If is , only the line terminator is written.
public void WriteLine( string format, object arg0 )
Writes a formatted string and a new line to the text stream, using the same semantics as the method.
formatA composite format string.arg0The object to format and write.
public void WriteLine( string format, object arg0, object arg1 )
Writes a formatted string and a new line to the text stream, using the same semantics as the method.
formatA composite format string.arg0The first object to format and write.arg1The second object to format and write.
public void WriteLine( string format, object arg0, object arg1, object arg2 )
Writes out a formatted string and a new line to the text stream, using the same semantics as .
formatA composite format string.arg0The first object to format and write.arg1The second object to format and write.arg2The third object to format and write.
public void WriteLine( string format, object[] arg )
Writes out a formatted string and a new line to the text stream, using the same semantics as .
formatA composite format string.argAn object array that contains zero or more objects to format and write.
public void WriteLine( uint value )
Writes the text representation of a 4-byte unsigned integer to the text stream, followed by a line terminator.
valueThe 4-byte unsigned integer to write.
public void WriteLine( ulong value )
Writes the text representation of an 8-byte unsigned integer to the text stream, followed by a line terminator.
valueThe 8-byte unsigned integer to write.
public Task WriteLineAsync( char value )
Asynchronously writes a character to the text stream, followed by a line terminator.
valueThe character to write to the text stream.- Returns A task that represents the asynchronous write operation.
public Task WriteLineAsync( char[] buffer )
Asynchronously writes an array of characters to the text stream, followed by a line terminator.
bufferThe character array to write to the text stream. If the character array is , only the line terminator is written.- Returns A task that represents the asynchronous write operation.
public Task WriteLineAsync( char[] buffer, int index, int count )
Asynchronously writes a subarray of characters to the text stream, followed by a line terminator.
bufferThe character array to write data from.indexThe character position in the buffer at which to start retrieving data.countThe number of characters to write.- Returns A task that represents the asynchronous write operation.
public Task WriteLineAsync( string value )
Asynchronously writes a string to the text stream, followed by a line terminator.
valueThe string to write. If the value is , only a line terminator is written.- Returns A task that represents the asynchronous write operation.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public object GetLifetimeService( )
😔 No documentation found.
public static TextWriter CreateBroadcasting( TextWriter[] writers )
😔 No documentation found.
public void Dispose( )
😔 No documentation found.
public Task FlushAsync( CancellationToken cancellationToken )
😔 No documentation found.
public Task FlushAsync( )
😔 No documentation found.
public Task WriteLineAsync( )
😔 No documentation found.
public Task WriteLineAsync( ReadOnlyMemory<char> buffer, CancellationToken cancellationToken = null )
😔 No documentation found.
public object InitializeLifetimeService( )
😔 No documentation found.
public void Flush( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public void Close( )
😔 No documentation found.
public void Write( ReadOnlySpan<char> buffer )
😔 No documentation found.
public Task WriteAsync( StringBuilder value, CancellationToken cancellationToken = null )
😔 No documentation found.
public void Write( StringBuilder value )
😔 No documentation found.
public void Write( string format, ReadOnlySpan<object> arg )
😔 No documentation found.
public void WriteLine( string format, ReadOnlySpan<object> arg )
😔 No documentation found.
public void WriteLine( )
😔 No documentation found.
public void WriteLine( StringBuilder value )
😔 No documentation found.
public void WriteLine( ReadOnlySpan<char> buffer )
😔 No documentation found.
public ValueTask DisposeAsync( )
😔 No documentation found.
public Task WriteLineAsync( StringBuilder value, CancellationToken cancellationToken = null )
😔 No documentation found.
public Task WriteAsync( ReadOnlyMemory<char> buffer, CancellationToken cancellationToken = null )
😔 No documentation found.