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 작업 을 참조하세요.

적용 대상

추가 정보