On 07/01/2013 03:23 PM, Tyro[17] wrote:

> So just to confirm my understanding: Because the address at memory is
> casted to ushort* in defining base, every iteration of the foreach loop
> advances the pointer two bytes into the array?

Yes. The incerement operator on a pointer advances the pointer to point at the next element. Automatic! :)

Same with arithmetic operations. (ptr + 1) is the address value that points at the next element.

Ali

Reply via email to