J
Jeff Johnson
I was reading the MSDN documentation for the Buffer.BlockCopy method. Here's
a piece from the current (3.5) version:
============
The BlockCopy method accesses the bytes in the src parameter array using
offsets into memory, not programming constructs such as indices or upper and
lower array bounds. For example, if in the programming language of your
application you declare an Int32 array with a zero-based lower bound of -50,
then pass the array and an offset of 5 to the BlockCopy method, the first
array element the method will access is the second element of the array,
which is at index -49. Furthermore, which byte of array element -49 is
accessed first depends on the endianess of the computer executing your
application.
============
"zero-based lower bound of -50"? WTF? Isn't the phrase "zero-based" just a
shorthand for "lower bound of zero"?
a piece from the current (3.5) version:
============
The BlockCopy method accesses the bytes in the src parameter array using
offsets into memory, not programming constructs such as indices or upper and
lower array bounds. For example, if in the programming language of your
application you declare an Int32 array with a zero-based lower bound of -50,
then pass the array and an offset of 5 to the BlockCopy method, the first
array element the method will access is the second element of the array,
which is at index -49. Furthermore, which byte of array element -49 is
accessed first depends on the endianess of the computer executing your
application.
============
"zero-based lower bound of -50"? WTF? Isn't the phrase "zero-based" just a
shorthand for "lower bound of zero"?