Прочитај на енглеском Уреди

Делите путем


IndentedTextWriter.Write Method

Definition

Writes the specified string to the text stream.

Overloads

Write(String, Object, Object)

Writes out a formatted string, using the same semantics as specified.

Write(Char[], Int32, Int32)

Writes a subarray of characters to the text stream.

Write(String, ReadOnlySpan<Object>)

Writes out a formatted string, using the same semantics as specified.

Write(String, Object[])

Writes out a formatted string, using the same semantics as specified.

Write(String, Object)

Writes out a formatted string, using the same semantics as specified.

Write(String)

Writes the specified string to the text stream.

Write(Single)

Writes the text representation of a Single to the text stream.

Write(Boolean)

Writes the text representation of a Boolean value to the text stream.

Write(Int64)

Writes the text representation of an 8-byte integer to the text stream.

Write(Int32)

Writes the text representation of an integer to the text stream.

Write(Double)

Writes the text representation of a Double to the text stream.

Write(Char[])

Writes a character array to the text stream.

Write(Char)

Writes a character to the text stream.

Write(Object)

Writes the text representation of an object to the text stream.

Write(String, Object, Object)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

C#
public override void Write(string format, object? arg0, object? arg1);
C#
public override void Write(string format, object arg0, object arg1);

Parameters

format
String

The formatting string to use.

arg0
Object

The first object to write into the formatted string.

arg1
Object

The second object to write into the formatted string.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Char[], Int32, Int32)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes a subarray of characters to the text stream.

C#
public override void Write(char[] buffer, int index, int count);

Parameters

buffer
Char[]

The character array to write data from.

index
Int32

Starting index in the buffer.

count
Int32

The number of characters to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(String, ReadOnlySpan<Object>)

Writes out a formatted string, using the same semantics as specified.

C#
public override void Write(string format, scoped ReadOnlySpan<object?> arg);

Parameters

format
String

The formatting string to use.

arg
ReadOnlySpan<Object>

The argument span to output.

Applies to

.NET 10 и .NET 9
Производ Верзије
.NET 9, 10

Write(String, Object[])

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

C#
public override void Write(string format, params object?[] arg);
C#
public override void Write(string format, params object[] arg);

Parameters

format
String

The formatting string to use.

arg
Object[]

The argument array to output.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(String, Object)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

C#
public override void Write(string format, object? arg0);
C#
public override void Write(string format, object arg0);

Parameters

format
String

The formatting string.

arg0
Object

The object to write into the formatted string.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(String)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the specified string to the text stream.

C#
public override void Write(string? s);
C#
public override void Write(string s);

Parameters

s
String

The string to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Single)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of a Single to the text stream.

C#
public override void Write(float value);

Parameters

value
Single

The single to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Boolean)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of a Boolean value to the text stream.

C#
public override void Write(bool value);

Parameters

value
Boolean

The Boolean value to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Int64)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of an 8-byte integer to the text stream.

C#
public override void Write(long value);

Parameters

value
Int64

The 8-byte integer to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Int32)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of an integer to the text stream.

C#
public override void Write(int value);

Parameters

value
Int32

The integer to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Double)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of a Double to the text stream.

C#
public override void Write(double value);

Parameters

value
Double

The double to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Char[])

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes a character array to the text stream.

C#
public override void Write(char[]? buffer);
C#
public override void Write(char[] buffer);

Parameters

buffer
Char[]

The character array to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Char)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes a character to the text stream.

C#
public override void Write(char value);

Parameters

value
Char

The character to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Write(Object)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Writes the text representation of an object to the text stream.

C#
public override void Write(object? value);
C#
public override void Write(object value);

Parameters

value
Object

The object to write.

Applies to

.NET 10 и друге верзије
Производ Верзије
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1