I'd just like to say thanks for your suggestions and quite complete solutions. I particularly liked the alternate implementation presented by Marco. I must admit that I did not understand what was happening at first.

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?

Thanks,
Andrew

Reply via email to