代码如下:

代码#region 取得windows的所有进程
public static string GetCourse()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
string tempName = "" ;
int begpos, endpos;
foreach (Process thisProc in System.Diagnostics.Process.GetProcesses())
{
tempName = thisProc.ToString();
begpos = tempName.IndexOf( " ( " ) + 1 ;
endpos = tempName.IndexOf( " ) " );
tempName = tempName.Substring(begpos, endpos - begpos);
sb.Append(tempName + " <br /> " );
}
return sb.ToString();
}
#endregion
本文标题:asp.net 取windows的所有进程
本文链接:https://blog.quwenai.cn/post/5217.html
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。






还没有评论,来说两句吧...