asp.net 取windows的所有进程
生活随笔
收集整理的這篇文章主要介紹了
asp.net 取windows的所有进程
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
代碼如下:
?
代碼 #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的所有进程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 批处理编程详解
- 下一篇: ASP.NET MVC 5调用其他Act