新手入门自己写的第一个Csharp程序,请各位高手看一下
如上所述:
我写了一个程序,想请各位高手看一下,然后给我一点儿意见(代码质量怎么样,可以怎么改(给点儿提示就行了)
代码如下:
/* ProcessMan.cs Code by suRbYmiR *
* Used to list and kill process *
* 2007.07.20 The First Edition *
* */
using System;
using System.Diagnostics;
using System.ComponentModel;
namespace ProcessManger
{
class ProcessMan
{
public void ListProcess()
{
Process[] LocalAll = Process.GetProcesses();
int Len=LocalAll.Length;
int i=0;
try
{
string[] sout=DealProcesses(LocalAll,Len);
for (; i < Len; i++)
{
Console.Write( "{0} PID ", sout[i]);
Console.Write(LocalAll[i].Id);
Console.WriteLine();
}