At first I used a StreamReader to read text from a file:
StreamReader
StreamReader reader = new StreamReader(dialog.OpenFile()); txtEditor.Text = reader.Read
If you use File.ReadAllText to read an unmanaged logging file (control by fstream), call File.ReadAllText, there will have IO.Exception:
File.ReadAllText
IO.Exception
The file is control by another process
You must to use StreamReader ReadToEnd to replace it.
ReadToEnd