public static T[] Combine<T>(
this T[] source,
int sourceOffset,
int sourceCount,
T[] other,
int otherOffset,
int otherCount
)
<ExtensionAttribute>
Public Shared Function Combine(Of T) (
source As T(),
sourceOffset As Integer,
sourceCount As Integer,
other As T(),
otherOffset As Integer,
otherCount As Integer
) As T()
public:
[ExtensionAttribute]
generic<typename T>
static array<T>^ Combine(
array<T>^ source,
int sourceOffset,
int sourceCount,
array<T>^ other,
int otherOffset,
int otherCount
)
Only use this function if you need a copy of the combined arrays, it will be optimal to use the Linq function ConcatTSource(IEnumerableTSource, IEnumerableTSource) if you simply need to iterate over the combined arrays.
This function can easily throw an out of memory exception if there is not enough contiguous memory to create an array sized with the combined lengths.
ArgumentOutOfRangeException | sourceOffset or otherOffset is outside the range of valid indexes for the associated array -or- sourceCount or otherCount is less than 0 -or- sourceOffset or otherOffset, and sourceCount or otherCount do not specify a valid section in the associated array. |