C# StringWriter Write(Boolean)

Description

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

Syntax

StringWriter.Write(Boolean) has the following syntax.


public virtual void Write(
  bool value
)

Parameters

StringWriter.Write(Boolean) has the following parameters.

  • value - The Boolean value to write.

Returns

StringWriter.Write(Boolean) method returns

Example


/*w  w w  .  j a va2  s .  c o  m*/
using System;
using System.Globalization;
using System.IO;

class StrWriter
{
    static void Main()
    {
        StringWriter strWriter = new StringWriter();

        strWriter.Write(true);
        
        Console.WriteLine(strWriter.ToString());
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.IO »




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