short[] sBuf = new short[2];
sBuf[0] = 1;
sBuf[1] = 2;
bool[] bBuf = new bool[sBuf.Length * 16];
Buffer.BlockCopy(sBuf, 0, bBuf, 0, sBuf.Length * 2);
Desired result value
sBuf[0] = 1
bBuf[0] = true, bBuf[1] = false, bBuf[2] = false, bBuf[3] = false...
sBuf[0] = 2
bBuf[16] = false, bBuf[17] = true, bBuf[18] = false, bBuf[19] = false...
But can not be converted correctly.
I want to convert from short [] to bool [], but I don't know how.
bool
element betrue
? – Bedpost