Stream.Null 欄位

定義

沒有底層存放區的 Stream

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 將輸出重新導向至不會耗用任何操作系統資源的數據流。 當在 上Null叫用提供寫入的方法Stream時,呼叫只會傳回,而且不會寫入任何數據。 Null 也會實作 Read 傳回零而不讀取數據的方法。

適用於

另請參閱