C# StringWriter WriteLine(Char[]) Array

Description

StringWriter WriteLine(Char[]) Writes an array of characters followed by a line terminator to the text string or stream.

Syntax

StringWriter.WriteLine(Char[]) has the following syntax.


public virtual void WriteLine(
  char[] buffer
)

Parameters

StringWriter.WriteLine(Char[]) has the following parameters.

  • buffer - The character array from which data is read.

Returns

StringWriter.WriteLine(Char[]) method returns

Example


/*from ww  w.  j  av  a  2 s .  c o  m*/
using System;
using System.Globalization;
using System.IO;

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