I guess, you are trying to opening the file while in use.
Try the below block. May be it help.
FileStream fs = new FileStream("TestFile.txt", FileMode.Open, FileAccess.Read);
using (StreamReader reader = new StreamReader(fs))
{
MessageBox.Show(reader.ReadLine());
}
Mark it as Answer if it is helpful.