Yes. Don't call the Convert.ToInt16 method, it's not needed when you
convert a byte to a short. All it does is:
public static short ToInt16(byte value)
{
return value;
}
As to the loop, it can't be avoided. As a byte and short are of
different size, you can't copy the data using any block copy method.
Ole wrote:
Hi,
Is there a better / faster way to convert a byte array to a short array than
to use Convert.toInt16(bytearray, i) in a loop?
Thanks
Ole