Click or drag to resize

CollectionExtensionsCopyT Method

Returns a copy of the Array.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public static T[] Copy<T>(
	this T[] source,
	int startIndex,
	int length
)
View Source

Parameters

source  T
The source Array whose elements are to be copied.
startIndex  Int32
The source array index from where the elements are to be copied.
length  Int32
The number of elements to be copied starting from the startIndex.

Type Parameters

T
Type of the Array to be copied.

Return Value

T
An Array of elements copied from the specified portion of the source Array.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionstartIndex is outside the range of valid indexes for the source Array -or- length is less than 0.
Remarks
Returned Array will be extended as needed to make it the specified length, but it will never be less than the source Array length - startIndex.
See Also