text: public void UpdateNameCommentRecordCache(NameCommentRecord commentRecord){if (commentRecords.ContainsValue(commentRecord)){foreach (KeyValuePair<string, NameCommentRecord> entry in commentRecords){if (entry.Value.Equals(commentRecord)){commentRecords.Remove(entry.Key);break;}}}commentRecords[commentRecord.NameText] = commentRecord;}