public static void CleanUp() { try { _notepad.Kill(); } catch (InvalidOperationException) { } _notepad.Dispose(); }