C# StreamWriter Write(Char[]) Array
Description
StreamWriter Write(Char[])
Writes a character array
to the stream.
Syntax
StreamWriter.Write(Char[])
has the following syntax.
public override void Write(
char[] buffer
)
Parameters
StreamWriter.Write(Char[])
has the following parameters.
buffer
- A character array containing the data to write. If buffer is null, nothing is written.
Returns
StreamWriter.Write(Char[])
method returns
Example
// w w w . j a v a 2 s . c o m
using System;
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(new char[]{'a'});
}
}
}