SortedDictionary<TKey,TValue>.ValueCollection.CopyTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the SortedDictionary<TKey,TValue>.ValueCollection elements to an existing one-dimensional array, starting at the specified array index.
public:
virtual void CopyTo(cli::array <TValue> ^ array, int index);
public void CopyTo (TValue[] array, int index);
abstract member CopyTo : 'Value[] * int -> unit
override this.CopyTo : 'Value[] * int -> unit
Public Sub CopyTo (array As TValue(), index As Integer)
Parameters
- array
- TValue[]
The one-dimensional array that is the destination of the elements copied from the SortedDictionary<TKey,TValue>.ValueCollection. The array must have zero-based indexing.
- index
- Int32
The zero-based index in array
at which copying begins.
Implements
Exceptions
array
is null
.
index
is less than 0.
The number of elements in the source SortedDictionary<TKey,TValue>.ValueCollection is greater than the available space from index
to the end of the destination array
.
Remarks
The elements are copied to the array in the same order in which the enumerator iterates through the SortedDictionary<TKey,TValue>.ValueCollection.
This method is an O(n
) operation, where n
is Count.
Applies to
See also
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za