kill process of web browsers c#
using System.Diagnostics;Process[] process_list = Process.GetProcesses();
foreach (Process process in process_list)
{
if (process.ProcessName.ToLower().Contains("firefox".ToLower()))
{
process.Kill();
}
else if (process.ProcessName.ToLower().Contains("chrome".ToLower()))
{
process.Kill();
}
else if (process.ProcessName.ToLower().Contains("iexplore".ToLower()))
{
process.Kill();
}
}