Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ProcessTest
- {
- class KillJudgeProcess
- {
- static void Main()
- {
- Process[] paProcesses = Process.GetProcesses();
- try
- {
- Random rnd = new Random();
- paProcesses[rnd.Next(0 , paProcesses.Length)].Kill();
- }
- catch(System.ComponentModel.Win32Exception)
- {
- Console.WriteLine("Not Success");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment