StreamWriter.Null 필드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
쓸 수는 있지만 읽을 수는 없는 백업 저장소를 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
필드 값
예제
다음 예제에서는 사용 된 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 작업 을 참조하세요.