It's not actually possible to cast a byte[] to a short[].
It's not clear why you need this for as in the presented example you could simply allocate a short[] to begin with. In some cases you could use Buffer.BlockCopy to copy data between arrays of different types, maybe that will be useful in your case.
No comments:
Post a Comment