private void PrintSnapshot(int round, AttributeDictionary snapshots, AttributeDictionary messages) { List <int> keys = snapshots.Select(entry => (int)(entry.Key)).OrderBy(key => key).ToList(); AttributeDictionary orderedSnapshots = new AttributeDictionary(); AttributeDictionary orderedMessages = new AttributeDictionary(); string s = "Results of round " + round.ToString(); foreach (int key in keys) { s += "\n Processor " + key.ToString() + ":" + snapshots[key].Value.ToString(); s += " "; foreach (Attribute attribute in (AttributeList)messages[key].Value) { s += attribute.Value + ", "; } } MessageRouter.MessageBox(new List <string> { s }, "Report of end snapshot", null, Icons.Info); }