using System.Diagnostics;
...
Process[] processList = Process.GetProcesses();
foreach(Process p in processList)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = p.ProcessName;
lvi.Tag = p.Id;
processListView.Items.Add(lvi);
}
foreach(Process p in processList)


Compared to Template classes or STL type iterators etc in C++, C#'s way of dealing with this stuff like generics actually is I think quite a bit nicer, though I miss my multiple inheritance at times. (not supported in C#, though you can still implement multiple interfaces in one class so it 'sorta' lets you do it).