I am learning C# and opening a text file using the following code.
string text = System.IO.File.ReadAllText(@"\\127.0.0.1\Temp\players.txt");
The same text file is also being opened by other applications also and sometimes the application throws exception when the file is already opened by the other application.
I want to wait till the file is closed and than open it