今天准備在我的文本轉換工具裡集成這個功能
using System;
using System
using System
using System
using System
using System
namespace TextConvertor
{
/**//// <summary>
/// W
/// </summary>
public class W
{
private W
public static string GetAllW
{
ObjectQuery oQuery = new ObjectQuery(
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oReturnCollection = oSearcher
string pid;
string cmdLine;
StringBuilder sb = new StringBuilder() ;
foreach(ManagementObject oReturn in oReturnCollection)
{
pid = oReturn
cmdLine = (string)oReturn
string pattern =
Regex regex = new Regex(pattern
Match match = regex
string appPoolName = match
sb
}
return sb
}
}
}
實現的原理和VBScript簡直一模一樣
From:http://tw.wingwit.com/Article/program/net/201311/12911.html