C# StringWriter WriteLine(Char)

Description

StringWriter WriteLine(Char) Writes a character followed by a line terminator to the text string or stream.

Syntax

StringWriter.WriteLine(Char) has the following syntax.


public virtual void WriteLine(
  char value
)

Parameters

StringWriter.WriteLine(Char) has the following parameters.

  • value - The character to write to the text stream.

Returns

StringWriter.WriteLine(Char) method returns

Example


//from   w  w  w.  java 2 s.  c  om
using System;
using System.Globalization;
using System.IO;

class StrWriter
{
    static void Main()
    {
        StringWriter strWriter = new StringWriter();
        
        strWriter.WriteLine('c');
        
        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