Writes data to the text stream, followed by a line terminator.
Overloads WriteLine(String, Object, Object)Writes a formatted string and a new line to the text stream, using the same semantics as the Format(String, Object, Object) method.
WriteLine(Char[], Int32, Int32)Writes a subarray of characters to the text stream, followed by a line terminator.
WriteLine(String, ReadOnlySpan<Object>)Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, ReadOnlySpan<Object>).
WriteLine(String, Object[])Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).
WriteLine(String, Object)Writes a formatted string and a new line to the text stream, using the same semantics as the Format(String, Object) method.
WriteLine(UInt64)Writes the text representation of an 8-byte unsigned integer to the text stream, followed by a line terminator.
WriteLine(String, Object, Object, Object)Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).
WriteLine(UInt32)Writes the text representation of a 4-byte unsigned integer to the text stream, followed by a line terminator.
WriteLine(StringBuilder)Writes the text representation of a string builder to the text stream, followed by a line terminator.
WriteLine(String)Writes a string to the text stream, followed by a line terminator.
WriteLine(Single)Writes the text representation of a 4-byte floating-point value to the text stream, followed by a line terminator.
WriteLine(Double)Writes the text representation of a 8-byte floating-point value to the text stream, followed by a line terminator.
WriteLine(Object)Writes the text representation of an object to the text stream, by calling the ToString
method on that object, followed by a line terminator.
Writes the text representation of an 8-byte signed integer to the text stream, followed by a line terminator.
WriteLine(Int32)Writes the text representation of a 4-byte signed integer to the text stream, followed by a line terminator.
WriteLine(Decimal)Writes the text representation of a decimal value to the text stream, followed by a line terminator.
WriteLine(Char[])Writes an array of characters to the text stream, followed by a line terminator.
WriteLine(Char)Writes a character to the text stream, followed by a line terminator.
WriteLine(Boolean)Writes the text representation of a Boolean
value to the text stream, followed by a line terminator.
Writes a line terminator to the text stream.
WriteLine(ReadOnlySpan<Char>)Writes the text representation of a character span to the text stream, followed by a line terminator.
WriteLine(String, Object, Object)public:
virtual void WriteLine(System::String ^ format, System::Object ^ arg0, System::Object ^ arg1);
public virtual void WriteLine(string format, object arg0, object arg1);
public virtual void WriteLine(string format, object? arg0, object? arg1);
abstract member WriteLine : string * obj * obj -> unit
override this.WriteLine : string * obj * obj -> unit
Public Overridable Sub WriteLine (format As String, arg0 As Object, arg1 As Object)
Parameters
A composite format string.
The first object to format and write.
The second object to format and write.
Exceptionsformat
is not a valid composite format string.
-or-
The index of a format item is less than 0 (zero), or greater than or equal to the number of objects to be formatted (which, for this method overload, is two).
RemarksThis method uses composite formatting to convert the value of an object to its string representation and to embed that representation in a string. .NET provides extensive formatting support, which is described in greater detail in the following formatting topics:
For more information about the composite formatting feature, see Composite Formatting.
For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.
For more information about date and time format specifiers, see Standard Date and Time Format Strings and Custom Date and Time Format Strings.
For more information about enumeration format specifiers, see Enumeration Format Strings.
For more information about formatting, see Formatting Types.
The format
parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the string representation of the value of the corresponding object.
The syntax of a format item is as follows:
{index[,length][:formatString]}
Elements in square brackets are optional. The following table describes each element. For more information about the composite formatting feature, including the syntax of a format item, see Composite Formatting.
Element Description index The zero-based position in the parameter list of the object to be formatted. If the object specified by index isnull
, the format item is replaced by String.Empty. Because this overload has two objects in its parameter list, the value of index must always be 0 or 1. If there is no parameter in the index position, a FormatException is thrown. ,length The minimum number of characters in the string representation of the parameter. If positive, the parameter is right-aligned; if negative, it is left-aligned. :formatString A standard or custom format string that is supported by the object to be formatted. Possible values for formatString are the same as the values supported by the object's ToString(string format)
method. If formatString is not specified and the object to be formatted implements the IFormattable interface, null
is passed as the value of the format
parameter that is used as the IFormattable.ToString format string.
The leading and trailing brace characters, "{" and "}", are required. To specify a single literal brace character in format
, specify two leading or trailing brace characters; that is, "{{" or "}}".
This method does not search the specified string for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.
If a specified object is not referenced in the format string, it is ignored.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
See alsoWrites a subarray of characters to the text stream, followed by a line terminator.
public:
virtual void WriteLine(cli::array <char> ^ buffer, int index, int count);
public virtual void WriteLine(char[] buffer, int index, int count);
abstract member WriteLine : char[] * int * int -> unit
override this.WriteLine : char[] * int * int -> unit
Public Overridable Sub WriteLine (buffer As Char(), index As Integer, count As Integer)
Parameters
The character array from which data is read.
The character position in buffer
at which to start reading data.
The maximum number of characters to write.
ExceptionsThe buffer length minus index
is less than count
.
The buffer
parameter is null
.
index
or count
is negative.
This method will write count
characters of data into this TextWriter
from the buffer
character array starting at position index
.
This overload is equivalent to calling the Write(Char[]) method followed by WriteLine for each character in buffer
between index
and (index
+ count
).
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
See alsopublic:
virtual void WriteLine(System::String ^ format, ReadOnlySpan<System::Object ^> arg);
public virtual void WriteLine(string format, scoped ReadOnlySpan<object?> arg);
abstract member WriteLine : string * ReadOnlySpan<obj> -> unit
override this.WriteLine : string * ReadOnlySpan<obj> -> unit
Public Overridable Sub WriteLine (format As String, arg As ReadOnlySpan(Of Object))
Parameters
A composite format string.
An object span that contains zero or more objects to format and write.
WriteLine(String, Object[])Writes out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).
public:
virtual void WriteLine(System::String ^ format, ... cli::array <System::Object ^> ^ arg);
public virtual void WriteLine(string format, params object[] arg);
public virtual void WriteLine(string format, params object?[] arg);
abstract member WriteLine : string * obj[] -> unit
override this.WriteLine : string * obj[] -> unit
Public Overridable Sub WriteLine (format As String, ParamArray arg As Object())
Parameters
A composite format string.
An object array that contains zero or more objects to format and write.
ExceptionsA string or object is passed in as null
.
format
is not a valid composite format string.
-or-
The index of a format item is less than 0 (zero), or greater than or equal to the length of the arg
array.
This method uses composite formatting to convert the value of an object to its string representation and to embed that representation in a string. .NET provides extensive formatting support, which is described in greater detail in the following formatting topics:
For more information about the composite formatting feature, see Composite Formatting.
For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.
For more information about date and time format specifiers, see Standard Date and Time Format Strings and Custom Date and Time Format Strings.
For more information about enumeration format specifiers, see Enumeration Format Strings.
For more information about formatting, see Formatting Types.
The format
parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the string representation of the value of the corresponding object.
The syntax of a format item is as follows:
{index[,length][:formatString]}
Elements in square brackets are optional. The following table describes each element. For more information about the composite formatting feature, including the syntax of a format item, see Composite Formatting.
Element Description index The zero-based position in the parameter list of the object to be formatted. If the object specified by index isnull
, the format item is replaced by String.Empty. Because this overload has an array in its parameter list, the value of index must always be less than the length of the array. If there is no parameter in the index position, a FormatException is thrown. ,length The minimum number of characters in the string representation of the parameter. If positive, the parameter is right-aligned; if negative, it is left-aligned. :formatString A standard or custom format string that is supported by the object to be formatted. Possible values for formatString are the same as the values supported by the object's ToString(string format)
method. If formatString is not specified and the object to be formatted implements the IFormattable interface, null
is passed as the value of the format
parameter that is used as the IFormattable.ToString format string.
The leading and trailing brace characters, "{" and "}", are required. To specify a single literal brace character in format
, specify two leading or trailing brace characters; that is, "{{" or "}}".
This method does not search the specified string for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.
If a specified object is not referenced in the format string, it is ignored.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
See alsoWrites a formatted string and a new line to the text stream, using the same semantics as the Format(String, Object) method.
public:
virtual void WriteLine(System::String ^ format, System::Object ^ arg0);
public virtual void WriteLine(string format, object arg0);
public virtual void WriteLine(string format, object? arg0);
abstract member WriteLine : string * obj -> unit
override this.WriteLine : string * obj -> unit
Public Overridable Sub WriteLine (format As String, arg0 As Object)
Parameters
A composite format string.
The object to format and write.
Exceptionsformat
is not a valid composite format string.
-or-
The index of a format item is less than 0 (zero), or greater than or equal to the number of objects to be formatted (which, for this method overload, is one).
RemarksThis method uses composite formatting to convert the value of an object to its string representation and to embed that representation in a string. .NET provides extensive formatting support, which is described in greater detail in the following formatting topics:
For more information about the composite formatting feature, see Composite Formatting.
For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.
For more information about date and time format specifiers, see Standard Date and Time Format Strings and Custom Date and Time Format Strings.
For more information about enumeration format specifiers, see Enumeration Format Strings.
For more information about formatting, see Formatting Types.
The format
parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the string representation of the value of the corresponding object.
The syntax of a format item is as follows:
{index[,length][:formatString]}
Elements in square brackets are optional. The following table describes each element. For more information about the composite formatting feature, including the syntax of a format item, see Composite Formatting.
Element Description index The zero-based position in the parameter list of the object to be formatted. If the object specified by index isnull
, the format item is replaced by String.Empty. Because this overload has only a single object in its parameter list, the value of index must always be 0. If there is no parameter in the index position, a FormatException is thrown. ,length The minimum number of characters in the string representation of the parameter. If positive, the parameter is right-aligned; if negative, it is left-aligned. :formatString A standard or custom format string that is supported by the object to be formatted. Possible values for formatString are the same as the values supported by the object's ToString(string format)
method. If formatString is not specified and the object to be formatted implements the IFormattable interface, null
is passed as the value of the format
parameter that is used as the IFormattable.ToString format string.
The leading and trailing brace characters, "{" and "}", are required. To specify a single literal brace character in format
, specify two leading or trailing brace characters; that is, "{{" or "}}".
This method does not search the specified string for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.
If a specified object is not referenced in the format string, it is ignored.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
See alsoWrites out a formatted string and a new line to the text stream, using the same semantics as Format(String, Object).
public:
virtual void WriteLine(System::String ^ format, System::Object ^ arg0, System::Object ^ arg1, System::Object ^ arg2);
public virtual void WriteLine(string format, object arg0, object arg1, object arg2);
public virtual void WriteLine(string format, object? arg0, object? arg1, object? arg2);
abstract member WriteLine : string * obj * obj * obj -> unit
override this.WriteLine : string * obj * obj * obj -> unit
Public Overridable Sub WriteLine (format As String, arg0 As Object, arg1 As Object, arg2 As Object)
Parameters
A composite format string.
The first object to format and write.
The second object to format and write.
The third object to format and write.
Exceptionsformat
is not a valid composite format string.
-or-
The index of a format item is less than 0 (zero), or greater than or equal to the number of objects to be formatted (which, for this method overload, is three).
RemarksThis method uses composite formatting to convert the value of an object to its string representation and to embed that representation in a string. .NET provides extensive formatting support, which is described in greater detail in the following formatting topics:
For more information about the composite formatting feature, see Composite Formatting.
For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.
For more information about date and time format specifiers, see Standard Date and Time Format Strings and Custom Date and Time Format Strings.
For more information about enumeration format specifiers, see Enumeration Format Strings.
For more information about formatting, see Formatting Types.
The format
parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the string representation of the value of the corresponding object.
The syntax of a format item is as follows:
{index[,length][:formatString]}
Elements in square brackets are optional. The following table describes each element. For more information about the composite formatting feature, including the syntax of a format item, see Composite Formatting.
Element Description index The zero-based position in the parameter list of the object to be formatted. If the object specified by index isnull
, the format item is replaced by String.Empty. Because this overload has three objects in its parameter list, the value of index must always be 0, 1, or 2. If there is no parameter in the index position, a FormatException is thrown. ,length The minimum number of characters in the string representation of the parameter. If positive, the parameter is right-aligned; if negative, it is left-aligned. :formatString A standard or custom format string that is supported by the object to be formatted. Possible values for formatString are the same as the values supported by the object's ToString(string format)
method. If formatString is not specified and the object to be formatted implements the IFormattable interface, null
is passed as the value of the format
parameter that is used as the IFormattable.ToString format string.
The leading and trailing brace characters, "{" and "}", are required. To specify a single literal brace character in format
, specify two leading or trailing brace characters; that is, "{{" or "}}".
This method does not search the specified string for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.
If a specified object is not referenced in the format string, it is ignored.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
See alsoWrites the text representation of a string builder to the text stream, followed by a line terminator.
public:
virtual void WriteLine(System::Text::StringBuilder ^ value);
public virtual void WriteLine(System.Text.StringBuilder? value);
abstract member WriteLine : System.Text.StringBuilder -> unit
override this.WriteLine : System.Text.StringBuilder -> unit
Public Overridable Sub WriteLine (value As StringBuilder)
Parameters
The string, as a string builder, to write to the text stream.
RemarksThe text representation of the specified value is produced by calling the StringBuilder.ToString method.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
WriteLine(ReadOnlySpan<Char>)Writes the text representation of a character span to the text stream, followed by a line terminator.
public:
virtual void WriteLine(ReadOnlySpan<char> buffer);
public virtual void WriteLine(ReadOnlySpan<char> buffer);
abstract member WriteLine : ReadOnlySpan<char> -> unit
override this.WriteLine : ReadOnlySpan<char> -> unit
Public Overridable Sub WriteLine (buffer As ReadOnlySpan(Of Char))
Parameters Remarks
The text representation of the specified value is produced by calling the ReadOnlySpan<Char>.ToString method.
The line terminator is defined by the CoreNewLine field.
For a list of common I/O tasks, see Common I/O Tasks.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4