Type Reason ArgumentNullException array is null. ArgumentOutOfRangeException arrayIndex < 0. ArgumentException
array has more than one dimension.
arrayIndex > array.Length - The Hashtable.Count of the current instance.
InvalidCastException The type of the current instance is not assignment-compatible with the type of array.
To copy only the keys in the Hashtable, use Hashtable.Keys.CopyTo.
To copy only the values in the Hashtable, use Hashtable.Values.CopyTo.
This method is an O(n) operation, where n is Hashtable.Count.