Question: Is there a more efficient way to convert byte array to int16 array ?? or is there a way to use Buffer.BlockCopy to copy evry two byte to int16 array ???

```
public static int[] BYTarrToINT16arr(string fileName)
{
try
{
int bYte = 2;
byte[] buf = File.ReadAllBytes(fileName); 
int bufPos = 0;
int[] data = new int[buf.Length/2];
byte[] bt = new byte[bYte];
for (int i = 0; i < buf.Length/2; i++)
{
Array.Copy(buf, bufPos, bt, 0, bYte);
bufPos += bYte;
Array.Reverse(bt);
data[i] = BitConverter.ToInt16(bt, 0);
}
return data;
}
catch
{
return null;
}
}   

```

Answer: 
Use a `FileStream` and a `BinaryReader`. Something like this:

```
var int16List = List<Int16>();
using (var stream = new FileStream(filename, FileMode.Open))
using (var reader = new BinaryReader(stream))
{
    try
    {
        while (true)
            int16List.Add(reader.ReadInt16());
    }
    catch (EndOfStreamException ex)
    {
        // We've read the whole file
    }
}
return int16List.ToArray();

```

You can also read the whole file into a `byte[]`, and then use a `MemoryStream` instead of the `FileStream` if you want.

If you do this then you'll also be able to size the `List` approrpriately up front and make it a bit more efficient.
```
var bytes = File.ReadAllBytes(path);

var ints = bytes.TakeWhile((b, i) => i % 2 == 0).Select((b, i) => BitConverter.ToInt16(bytes, i));

if (bytes.Length % 2 == 1)
{
    ints = ints.Union(new[] {BitConverter.ToInt16(new byte[] {bytes[bytes.Length - 1], 0}, 0)});
}

return ints.ToArray();

```