StreamWriter.Null フィールド

定義

バッキング ストアを持たない書き込み専用の StreamWriter を提供します。

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

フィールド値

StreamWriter

フィールドの使用例を次に示 Null します。

if ( sw->Equals( StreamWriter::Null ) )
{
   sw->WriteLine( "The store can be written to, but not read from." );
}
if(sw.Equals(StreamWriter.Null))
{
    sw.WriteLine("The store can be written to, but not read from.");
}
If Sw.Equals(StreamWriter.Null) Then
    Sw.WriteLine("The store can be written to, but not read from.")
End If

注釈

オペレーティング Null システム リソースを消費 StreamWriter しない に出力をリダイレクトするには、 を使用します。

でメソッドを呼び出した場合、呼び出しは単に を返し、実際にはバッキング ストアにデータ StreamWriter.Write Null は書き込まれます。

共通 I/O タスクの一覧は、 共通 I/O タスク を参照してください。

適用対象

こちらもご覧ください