Reads strings from a file created in a text editor : FileStream « File Stream « C# / C Sharp
- C# / C Sharp
- 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
*/
Related examples in the same category