Copies the entire System.Collections.Specialized.NameValueCollection to a compatible one-dimensional Array, starting at the specified index of the target array.
- dest
- The one-dimensional Array that is the destination of the elements copied from System.Collections.Specialized.NameValueCollection. The Array must have zero-based indexing.
- index
- The zero-based index in dest at which copying begins.
Type Reason ArgumentNullException dest is null. ArgumentOutOfRangeException index < 0. ArgumentException dest has more than one dimension.
-or-
index >= dest.Length.
-or-
The number of elements in the current instance is greater than the available space from index to the end of the destination dest.
InvalidCastException At least one element in the current instance is not assignment-compatible with the type of dest.
The specified array must be of a compatible type.
This method uses Array.Copy(Array, Array, int) to copy the elements.
This method is an O(n) operation, where n is NameObjectCollectionBase.Count.