Write Char to Stream - CSharp File IO

CSharp examples for File IO:Text File

Description

Write Char to Stream

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.IO;//from w  w w. j av  a 2s.  c o  m
using System.Collections.Generic;
using System;

public class Main{
        public static void WriteChar(this Stream stream, char @char)
    {
      var writer = new StreamWriter(stream);
      writer.Write(@char);
      writer.Flush();
    }
}

Related Tutorials