Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- namespace Procces_manager
- {
- class MainClass
- {
- public static void Main (string[] args) {
- var file = "skype";
- var running = IsProcessRunning (file);
- Console.WriteLine ("{0} is {1}", file, running ? "running" : "not running");
- Console.Read ();
- }
- // Process Check
- public static bool IsProcessRunning (string name) {
- return Process.GetProcessesByName (name).Length != 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement