Reads strings from a file created in a text editor : FileStream : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » FileStream »

 

Reads strings from a file created in a text editor









    


using System;
using System.IO;

public class FileReadStrings {
  public static void Main( ) {
    String line;
    StreamReader f = new StreamReader("test.data");        
    while((line=f.ReadLine()) != null)                           
      Console.WriteLine(line);
    f.Close(); 
  }
}

//File: test.data
/*
4665 Street|Toronto|ON|90048
*/
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» FileStream