FrozenDictionary<TKey,TValue>.CopyTo Method

Definition

Overloads

CopyTo(Span<KeyValuePair<TKey,TValue>>)

Copies the elements of the dictionary to a span of type KeyValuePair<TKey,TValue>.

CopyTo(KeyValuePair<TKey,TValue>[], Int32)

Copies the elements of the dictionary to an array of type KeyValuePair<TKey,TValue>, starting at the specified destinationIndex.

CopyTo(Span<KeyValuePair<TKey,TValue>>)

Source:
FrozenDictionary.cs
Source:
FrozenDictionary.cs
Source:
FrozenDictionary.cs

Copies the elements of the dictionary to a span of type KeyValuePair<TKey,TValue>.

C#
public void CopyTo(Span<System.Collections.Generic.KeyValuePair<TKey,TValue>> destination);

Parameters

destination
Span<KeyValuePair<TKey,TValue>>

The span that is the destination of the elements copied from the dictionary.

Applies to

.NET 9 and other versions
Product Versions
.NET 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

CopyTo(KeyValuePair<TKey,TValue>[], Int32)

Source:
FrozenDictionary.cs
Source:
FrozenDictionary.cs
Source:
FrozenDictionary.cs

Copies the elements of the dictionary to an array of type KeyValuePair<TKey,TValue>, starting at the specified destinationIndex.

C#
public void CopyTo(System.Collections.Generic.KeyValuePair<TKey,TValue>[] destination, int destinationIndex);

Parameters

destination
KeyValuePair<TKey,TValue>[]

The array that is the destination of the elements copied from the dictionary.

destinationIndex
Int32

The zero-based index in destination at which copying begins.

Implements

Applies to

.NET 9 and other versions
Product Versions
.NET 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)