The example in this article describes how C # simply reads all the processes on the host. Share to everyone for your reference, specific as follows:
#region Get all processes for Windows public
static string GetCourse ()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder ();
String tempname = "";
int Begpos, endpos;
foreach (System.Diagnostics.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
Read more about C # Interested readers can view the site topics: "C # form Operation Tips Summary", "C # Common control usage Tutorial", "WinForm Control Usage Summary", "C # Programming Thread Usage Skills summary", "C # Operation Excel Skills Summary", "C # Summary of operational skills in XML files, C # tutorial on data structure and algorithms, C # array operation techniques Summary, and C # Introduction to object-oriented Programming
I hope this article will help you with C # programming.