Stream.Null Stream.Null Stream.Null Stream.Null Field

定義

沒有底層存放區的 StreamA Stream with no backing store.

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輸出重新導向至資料流,將不會取用任何作業系統資源。Use Null to redirect output to a stream that will not consume any operating system resources. 當的方法Stream,以提供上叫用寫入Null、 呼叫只會傳回,而不會寫入資料。When the methods of Stream that provide writing are invoked on Null, the call simply returns, and no data is written. Null 也會實作Read方法會傳回零,而不需要讀取資料。Null also implements a Read method that returns zero without reading data.

適用於

另請參閱