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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -