【发布时间】:2019-07-14 08:52:57
【问题描述】:
我在搜索过程中遇到问题。我想用 c# 在所有正在运行的进程中搜索特定的字母。例如我的进程有这个进程名称(notepad,notepad++,note,calc,mspaint),我想搜索“note”,结果搜索必须是三个项目(notepad,notepad++,note),因为只有三个进程包含“note”。如何编程...
此代码仅找到“记事本”,未找到包含字母
Process[] pname = Process.GetProcessesByName("notepad");
if (pname.Length == 0)
{
}
else
{
//some code if process found
}
【问题讨论】:
-
怎么做,请用示例代码说...也许吧?