I didn't expect the Object of the Hashtable in C # inserted the same primary key.
I want to traverse two havehtable nested and put it in the third HashTable. In order to save over time, I don't want to delete the past items. It is really unhappy! ! !
Hashtable vendor = new hashtable ();
Hashtable store = new hashtable ();
// assignments to Vendor and Store. . .
Hashtable table = new hashtable (); foreach (string s in vendor.keys) {string name = (string) vendor [s]; string storester = ""; int i = 0; Foreach (String Tin Store.keys) { IF (S.Equals) {IF (i == 0) StoreStr = "(SHOPID =" T; Else StoreStr = "OR Shopid =" T; i ;}
// I originally wanted to pass the items after traversing, it is estimated that Keys inside Foreach is just the first time, all removal operations will be reported.} If (StoreStr.length! = 0) // No store is not Do insert {StoreStr = ")"; string [] str = new string [2]; str [0] = name; Str [1] = storetr; //console.writeline ("vendorid=" s "name = " STR [0] " StoreStr = " Str [1]); Table.Add (S, STR);}}