Mono Class Library: System.Collections.Hashtable Overview | MembersSystem.Collections.Hashtable.CopyTo Method |
Copies the entries of the current instance to a one-dimensional Array starting at the specified index. [Edit]
|
- array
- The one-dimensional, zero-indexed Array that is the destination of the objects copied from the current instance. [Edit]
- arrayIndex
- A int that specifies the zero-based index in array at which copying begins. This value is between 0 and array.Length minus the Hashtable.Count of the current instance, inclusive. [Edit]
Type Reason ArgumentNullException array is null. [Edit] ArgumentOutOfRangeException arrayIndex < 0. [Edit] ArgumentException array has more than one dimension.
-or-
arrayIndex > array.Length - The Hashtable.Count of the current instance.
[Edit]InvalidCastException The type of the current instance is not assignment-compatible with the type of array. [Edit]
Operation
As described above.The DictionaryEntry elements in the current instance are copied to the Array in the same order in which they are contained the current instance. If DictionaryEntry is not assignment-compatible with the type of array, a InvalidCastException is thrown. If an exception is thrown while copying, the state of the current instance is undefined.
[Edit]
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0