FileExplorer.MainForm.InvokeNotepadAsync C# (CSharp) Method

InvokeNotepadAsync() private static method

private static InvokeNotepadAsync ( string file, ManualResetEvent whenDone ) : void
file string
whenDone ManualResetEvent
return void
        private static void InvokeNotepadAsync(string file, ManualResetEvent whenDone)
        {
            ThreadPool.QueueUserWorkItem(_ =>
            {
                try
                {
                    Process process = Process.Start(@"C:\Windows\notepad.exe", file);
                    process.WaitForExit();
                    whenDone.Set();
                }
                catch { }
            });
        }