語言

Stream.Null 欄位

定義

Stream A,沒有後備商店。

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

欄位值

備註

用於 Null 將輸出重新導向不會消耗作業系統資源的串流。 當該寫入方法 Stream 在 上 Null被呼叫時,呼叫僅返回,且不會寫入任何資料。 Null 同時實作一種 Read 方法,可在不讀取資料的情況下回傳 0。

適用於

另請參閱