using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Framework2._0Test
{
	internal class Program
	{
		static void Main(string[] args)
		{
			DateTime dd = new DateTime();
            Console.WriteLine(dd);

            Process[] processList;

			processList = Process.GetProcessesByName("cmd");
			KillProcesses(processList);

			processList = Process.GetProcessesByName("powershell");
			KillProcesses(processList);

			Console.ReadKey();

		}

		private static void KillProcesses(Process[] processes)
		{
			if (processes == null || processes.Length < 1) 
				return;

			foreach (Process process in processes)
			{
				process.Kill();
			}
		}
	}
}
