Read one character at a time : StreamReader : File Directory Stream C# Examples


C# Examples » File Directory Stream » StreamReader »

 

Read one character at a time









    
using  System;
using  System.IO;

public  class  MainClass
{
    static  void  Main(string[]  args)
    {
        StreamReader  MyStreamReader  =  new  StreamReader(@"c:\Projects\Testing.txt");

        for  (int  i  =  0;  i  <  99;  i++)
        {
            int  ch  =  MyStreamReader.Read();
            Console.WriteLine(ch);

        }

        MyStreamReader.Close();
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» StreamReader