日期:2014-05-17 浏览次数:20858 次
var modelList = Process.GetProcesses();
rptItems.DataSource = from c in modelList
orderby c.PrivateMemorySize64 descending
where c.Id!=curren.Id
select new {
c.Id,
c.ProcessName,
c.Threads.Count,
FileName=c.MainModule.FileName,//用它就报错
PrivateMemorySize64 = (c.PrivateMemorySize64) / 1024
};
rptItems.DataBind();
ManagementObjectSearcher QS = new ManagementObjectSearcher(new SelectQuery("Win32_Process"));