public override int Read(byte[] buffer, int index, int count) { uint bytesRead; byte[] b = buffer; if (index != 0) { b = new byte[buffer.Length - index]; buffer.CopyTo(b, 0); } comStream.Read(b, (uint)count, out bytesRead); if (index != 0) { b.CopyTo(buffer, index); } return (int)bytesRead; }