| Author: Hari 03 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi
you do something like this
Hashtable table = new Hashtable(); table.Add(1, "one");
Hashtable table1 = new Hashtable(); table1.Add(12, "twelve");
if (table.ContainsKey(1) && table1.ContainsKey(12)) { }
|
| Author: Deepthi 03 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
hi,
i want to modify what hari has written i.e, instead of using if, use nested foreach i.e foreach(key(datatype) i in table) { foreach(key(datatype) j in table1) { if(i == j) continue; //check if i and j are in ur arraylist, if not then //add to ur arraylist the key i and j here } } this way u collect ur unmatched keys from both the hashtables. try it...
regards deepthi
|