C# StreamWriter Write(Boolean)

Description

StreamWriter Write(Boolean) Writes the text representation of a Boolean value to the text string or stream.

Syntax

StreamWriter.Write(Boolean) has the following syntax.


public virtual void Write(
  bool value
)

Parameters

StreamWriter.Write(Boolean) has the following parameters.

  • value - The Boolean value to write.

Returns

StreamWriter.Write(Boolean) method returns

Example


using System;//from   www  .j  a  va 2 s.  c  om
using System.IO;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        string fileName = "test.txt";

        using (StreamWriter writer = new StreamWriter(fileName))
        {
            writer.Write(true);
        }
    }
}




















Home »
  C# Tutorial »
    System.IO »




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