Now we check if both unordered_maps are same of not .
foreach ( KeyValuePair < int , int > x in m1 ) { if ( ! m2 . ContainsKey ( x . Key ) m2 [ x . Key ] != x . Value ) return false ; } return true ; }