UnicastIPAddressInformationCollection.CopyTo Method

Definition

Copies the elements in this collection to a one-dimensional array of type UnicastIPAddressInformation.

C#
public virtual void CopyTo(System.Net.NetworkInformation.UnicastIPAddressInformation[] array, int offset);

Parameters

array
UnicastIPAddressInformation[]

A one-dimensional array that receives a copy of the collection.

offset
Int32

The zero-based index in array at which the copy begins.

Implements

Exceptions

array is null.

offset is less than zero.

array is multidimensional.

-or-

The number of elements in this UnicastIPAddressInformationCollection is greater than the available space from offset to the end of the destination array.

The elements in this UnicastIPAddressInformationCollection cannot be cast automatically to the type of the destination array.

Remarks

The array parameter must be one-dimensional with zero-based indexing.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1