private void Crash(string pid) { PCS pcs = null; pid_pcs_Dict.TryGetValue(pid, out pcs); if (pcs != null) { Console.WriteLine(pcs.Crash(pid)); } //process crashed -> remove pid from list pid_pcs_Dict.Remove(pid); }