Traverse through map to find the candidate with maximum votes .
int maxValueInMap = 0 ; String winner = " " ; foreach ( KeyValuePair < String , int > entry in map ) { String key = entry . Key ; int val = entry . Value ; if ( val > maxValueInMap ) { maxValueInMap = val ; winner = key ; }