bytearray - Convert byte array to short array in C# -
i'm reading file , wanted able convert array of bytes obtained file short array.
how go doing this?
one possibility using enumerable.select:
byte[] bytes; var shorts = bytes.select(b => (short)b).toarray(); another use array.convertall:
byte[] bytes; var shorts = array.convertall(bytes, b => (short)b);
Comments
Post a Comment