C# StreamWriter AutoFlush

Description

StreamWriter AutoFlush Gets or sets a value indicating whether the StreamWriter will flush its buffer to the underlying stream after every call to StreamWriter.Write.

Syntax

StreamWriter.AutoFlush has the following syntax.


public virtual bool AutoFlush { get; set; }

Example

The following example shows the syntax for using the AutoFlush property.


//from   w ww . ja  v a  2 s .  com
using System.IO;
using System;
public class MainClass{
  public static void Main(String[] argv){  
    StreamWriter sw = new StreamWriter("abc.txt");
    sw.AutoFlush = true;
    

  }
}




















Home »
  C# Tutorial »
    System.IO »




BinaryReader
BinaryWriter
Directory
DirectoryInfo
DriveInfo
File
FileInfo
FileStream
MemoryStream
Path
StreamReader
StreamWriter
StringReader
StringWriter