A code spinets of how to open and read a text file using c#.
// Define a StreamReader
private System.IO.StreamReader strReader;
private int FileChar;
private void btnOpen_Click(object sender, System.EventArgs e)
{
// Open the file
strReader = File.OpenText("c:/txtFileName.txt");
// Loop trough each character to the end of the file
while ((FileChar = strReader.Read()) != -1)
{
// Show the current char
//MessageBox.Show(Convert.ToChar(FileChar).ToString());
}
// Close the reader
strReader.Close();
}