publicstatic ICollection HashSumTable(int[] ar, int target) { int total = 0, temp = target; Hashtable hashtable = new Hashtable(); int length = ar.GetLength(0); // init HashTable ;; To exclude duplicating numbers, sort the table reversed for (int i = 0; i < length; i++) { hashtable.Add(ar[i].ToString(), 0); total += ar[i]; } if (target > total) { Console.WriteLine("No current result...."); }