Reading from a file.(Kept Adjacent to the .EXE file)
using System;
using System.IO;
class FileWriteDemo
{
public static void Main()
{
StreamWriter writer;
writer = new StreamWriter("test.txt");
writer.WriteLine("hello world");
writer.Close();
}
}