語言

TextWriter.Null 欄位

定義

提供 TextWriter 一個沒有備份的儲存庫,可以寫入但無法讀取。

public: static initonly System::IO::TextWriter ^ Null;
public static readonly System.IO.TextWriter Null;
 staticval mutable Null : System.IO.TextWriter
Public Shared ReadOnly Null As TextWriter 

欄位值

備註

用於 Null 將輸出重新導向不會消耗作業系統資源的串流。

當 TextWriter.Write 方法在 上 Null被呼叫時,呼叫會直接回傳,且資料不會寫入任何後備儲存。

關於常見 I/O 任務的清單,請參見 Common I/O 任務。

適用於

另請參閱