private static Semaphore _ExceptionFileLock = new Semaphore(1, 1);
try { // Take Hold of File Lock _ExceptionFileLock.WaitOne(); ...... Open the file strea, write, and close.... ...... } catch (Exception objException) { // Other Exception throw objException; } finally { //Release File Lock _ExceptionFileLock.Release(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)