C# StreamWriter Write(Char)
Description
StreamWriter Write(Char)
Writes a character to the stream.
Syntax
StreamWriter.Write(Char)
has the following syntax.
public override void Write(
char value
)
Parameters
StreamWriter.Write(Char)
has the following parameters.
value
- The character to write to the stream.
Returns
StreamWriter.Write(Char)
method returns
Example
using System;//ww w.ja v a2 s. c o m
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('a');
}
}
}