From the MSDN:
Parameters sourceArray
The Array that contains the data to copy. destinationArray
The Array that receives the data. length
A 64-bit integer that represents the number of elements to copy. The integer must be between zero and Int32.MaxValue, inclusive
Given that the permitted range of values is 0
to Int32.MaxValue
, what is the motivation for adding this signature? It did not exist in .Net 1.0 and was only added in .Net 1.1. My only guess is to prepare for 64-bit Framework implementations.
Curiously an array also has overloads for GetItem that take either an Int32 and an Int64. But in practice you cannot have a single object larger than 2 gigabytes in the current implementation of the .NET framework so you can't actually create an array that allows such large indexes.
I guess if this restriction were lifted later then it would mean that they don't need to change the interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With