private static InvokeNotepadAsync ( string file, ManualResetEvent whenDone ) : void | ||
file | string | |
whenDone | ManualResetEvent | |
리턴 | 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 { }
});
}