Process
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Diagnostics;
5 namespace ChineseLunisolarCalend
6 {
7 class Program
8 {
9 public static void Main(string[] args)
10 {
11 try
12 {
13 ShowProcessInfo();
14 }
15 catch (Exception e)
16 {
17 Console.WriteLine(e.Message);
18 }
19 finally
20 {
21
22 }
23
24 Console.ReadLine();
25 }
26
27 public static void ShowProcessInfo()
28 {
29 Process[] processes = Process.GetProcesses();
30 System.Console.WriteLine("进程ID 进程名字 优先级 启动时间");
31 foreach (Process p in processes)
32 {
33 Console.WriteLine(String.Format("{0} {1} {2} {3}", p.Id, p.ProcessName, p.BasePriority, p.StartTime));
34 }
35 }
36 }
37 }
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Diagnostics;
5 namespace ChineseLunisolarCalend
6 {
7 class Program
8 {
9 public static void Main(string[] args)
10 {
11 try
12 {
13 ShowProcessInfo();
14 }
15 catch (Exception e)
16 {
17 Console.WriteLine(e.Message);
18 }
19 finally
20 {
21
22 }
23
24 Console.ReadLine();
25 }
26
27 public static void ShowProcessInfo()
28 {
29 Process[] processes = Process.GetProcesses();
30 System.Console.WriteLine("进程ID 进程名字 优先级 启动时间");
31 foreach (Process p in processes)
32 {
33 Console.WriteLine(String.Format("{0} {1} {2} {3}", p.Id, p.ProcessName, p.BasePriority, p.StartTime));
34 }
35 }
36 }
37 }