Wednesday, February 12, 2014

Close Browser using C#

In Order to Kill (close) all Internet Explorer browser launched, I used following C# code

            Process[] localByName = Process.GetProcessesByName("iexplore");

            foreach (Process item in localByName)
            {
                try
                {
                    item.Kill();
                }
                catch
                {

                }
            }

No comments: