Click or drag to resize
OSIsoft, LLC

PIPointListCopyTo Method

Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version:
public void CopyTo(
	PIPoint[] array,
	int index


Type: OSIsoft.AF.PIPIPoint
The one-dimensional Array that is the destination of the items copied from the collection. The Array must have zero-based indexing.
Type: SystemInt32
The zero-based index in array at which copying begins.


ICollectionTCopyTo(T, Int32)
ArgumentNullExceptionarray is .
ArgumentOutOfRangeExceptionindex is less than zero.
ArgumentExceptionarray is multidimensional, does not have zero-based indexing, the number of elements in the source collection is greater than the available space from index to the end of the destination array, or type T is not assignable to the item type of the destination array.

This method uses System.Array.Copy to copy the items.

The elements are copied to the Array in the same order in which the enumerator iterates through the collection.

This method is an O(n) operation, where n is Count.

Version Information


Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5
See Also
Enabling Operational Intelligence