private void MatchAddListener(string allContent) { MatchCollection matches = Regex.Matches(allContent, AddListenerMatch); foreach (Match match in matches) { string eventName = match.Groups["STR"].Value; string actionName = match.Groups["STR2"].Value; EventItem eventItem = curOutPut.GetEventItem(eventName); int count; if (eventItem.addCount.TryGetValue(actionName, out count) == false) { count = 0; } count++; eventItem.addCount[actionName] = count; } }