CollectionExtensionsCopyT Method

Returns a copy of the Array.

Definition

Namespace: Gemstone.Collections.CollectionExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static T[] Copy<T>(
	this T[] source,
	int startIndex,
	int length
)

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).

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.

Exceptions

ArgumentOutOfRangeExceptionstartIndex is outside the range of valid indexes for the source Array -or- length is less than 0.

See Also