static bool AllFinished(IEnumerable<Program> programs) { foreach (Program p in programs) if (p != null && !p.finished) return false; return true; }