IndentedTextWriter.Write 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的字串寫入文字數據流。
多載
| 名稱 | Description |
|---|---|
| Write(String, Object, Object) |
使用與指定相同的語意來寫出格式化字串。 |
| Write(Char[], Int32, Int32) |
將字元的子陣列寫入文字數據流。 |
| Write(String, ReadOnlySpan<Object>) |
使用與指定相同的語意來寫出格式化字串。 |
| Write(String, Object[]) |
使用與指定相同的語意來寫出格式化字串。 |
| Write(String, Object) |
使用與指定相同的語意來寫出格式化字串。 |
| Write(String) |
將指定的字串寫入文字數據流。 |
| Write(Single) |
將Single的文字表示寫入文字數據流。 |
| Write(Boolean) |
將布爾值的文字表示寫入文字數據流。 |
| Write(Int64) |
將8位元組整數的文字表示寫入文字數據流。 |
| Write(Int32) |
將整數的文字表示寫入文字數據流。 |
| Write(Double) |
將 Double 的文字表示寫入文字數據流。 |
| Write(Char[]) |
將字元陣列寫入文字數據流。 |
| Write(Char) |
將字元寫入文字數據流。 |
| Write(Object) |
將物件的文字表示寫入文字數據流。 |
Write(String, Object, Object)
使用與指定相同的語意來寫出格式化字串。
public:
override void Write(System::String ^ format, System::Object ^ arg0, System::Object ^ arg1);
public override void Write(string format, object? arg0, object? arg1);
public override void Write(string format, object arg0, object arg1);
override this.Write : string * obj * obj -> unit
Public Overrides Sub Write (format As String, arg0 As Object, arg1 As Object)
參數
- format
- String
格式字串要用。
- arg0
- Object
第一個寫入格式化字串的物件。
- arg1
- Object
第二個要寫入格式化字串的物件。
適用於
Write(Char[], Int32, Int32)
將字元的子陣列寫入文字數據流。
public:
override void Write(cli::array <char> ^ buffer, int index, int count);
public override void Write(char[] buffer, int index, int count);
override this.Write : char[] * int * int -> unit
Public Overrides Sub Write (buffer As Char(), index As Integer, count As Integer)
參數
- buffer
- Char[]
要從中寫入數據的字元陣列。
- index
- Int32
緩衝區的起始索引。
- count
- Int32
要寫入的字元數。
適用於
Write(String, ReadOnlySpan<Object>)
使用與指定相同的語意來寫出格式化字串。
public:
override void Write(System::String ^ format, ReadOnlySpan<System::Object ^> arg);
public override void Write(string format, scoped ReadOnlySpan<object?> arg);
override this.Write : string * ReadOnlySpan<obj> -> unit
Public Overrides Sub Write (format As String, arg As ReadOnlySpan(Of Object))
參數
- format
- String
格式字串要用。
- arg
- ReadOnlySpan<Object>
論證範圍涵蓋輸出。
適用於
Write(String, Object[])
使用與指定相同的語意來寫出格式化字串。
public:
override void Write(System::String ^ format, ... cli::array <System::Object ^> ^ arg);
public override void Write(string format, params object?[] arg);
public override void Write(string format, params object[] arg);
override this.Write : string * obj[] -> unit
Public Overrides Sub Write (format As String, ParamArray arg As Object())
參數
- format
- String
格式字串要用。
- arg
- Object[]
將參數陣列輸出。
適用於
Write(String, Object)
使用與指定相同的語意來寫出格式化字串。
public:
override void Write(System::String ^ format, System::Object ^ arg0);
public override void Write(string format, object? arg0);
public override void Write(string format, object arg0);
override this.Write : string * obj -> unit
Public Overrides Sub Write (format As String, arg0 As Object)
參數
- format
- String
格式字串。
- arg0
- Object
要寫入格式化字串的物件。
適用於
Write(String)
將指定的字串寫入文字數據流。
public:
override void Write(System::String ^ s);
public override void Write(string? s);
public override void Write(string s);
override this.Write : string -> unit
Public Overrides Sub Write (s As String)
參數
- s
- String
要寫入的字串。
適用於
Write(Single)
將Single的文字表示寫入文字數據流。
public:
override void Write(float value);
public override void Write(float value);
override this.Write : single -> unit
Public Overrides Sub Write (value As Single)
參數
- value
- Single
要 single 寫的。
適用於
Write(Boolean)
將布爾值的文字表示寫入文字數據流。
public:
override void Write(bool value);
public override void Write(bool value);
override this.Write : bool -> unit
Public Overrides Sub Write (value As Boolean)
參數
- value
- Boolean
寫入布林值。
適用於
Write(Int64)
將8位元組整數的文字表示寫入文字數據流。
public:
override void Write(long value);
public override void Write(long value);
override this.Write : int64 -> unit
Public Overrides Sub Write (value As Long)
參數
- value
- Int64
要寫入的 8 位元組整數。
適用於
Write(Int32)
將整數的文字表示寫入文字數據流。
public:
override void Write(int value);
public override void Write(int value);
override this.Write : int -> unit
Public Overrides Sub Write (value As Integer)
參數
- value
- Int32
整數要寫。
適用於
Write(Double)
將 Double 的文字表示寫入文字數據流。
public:
override void Write(double value);
public override void Write(double value);
override this.Write : double -> unit
Public Overrides Sub Write (value As Double)
參數
- value
- Double
要 double 寫的。
適用於
Write(Char[])
將字元陣列寫入文字數據流。
public:
override void Write(cli::array <char> ^ buffer);
public override void Write(char[]? buffer);
public override void Write(char[] buffer);
override this.Write : char[] -> unit
Public Overrides Sub Write (buffer As Char())
參數
- buffer
- Char[]
要寫字元陣列。
適用於
Write(Char)
將字元寫入文字數據流。
public:
override void Write(char value);
public override void Write(char value);
override this.Write : char -> unit
Public Overrides Sub Write (value As Char)
參數
- value
- Char
要寫的角色。
適用於
Write(Object)
將物件的文字表示寫入文字數據流。
public:
override void Write(System::Object ^ value);
public override void Write(object? value);
public override void Write(object value);
override this.Write : obj -> unit
Public Overrides Sub Write (value As Object)
參數
- value
- Object
要寫入的物件。