FileStream fs = new FileStream("c:\\dd.bin ", FileMode.OpenOrCreate, FileAccess.ReadWrite);
            BinaryWriter binw = new BinaryWriter(fs);
            byte[] bytes = { 0x23, 0x22, 0x55 };
            binw.Write(bytes);                        binw.Close();
            fs.Close();
            using (FileStream fsSource = new FileStream("c:\\dd.bin ",FileMode.Open, FileAccess.Read))
            {
                bytes = null;
                // Read the source file into a byte array.
                bytes = new byte[fsSource.Length];
                int numBytesToRead = (int)fsSource.Length;
                int numBytesRead = 0;
                while (numBytesToRead > 0)
                {
                    // Read may return anything from 0 to numBytesToRead.
                    int n = fsSource.Read(bytes, numBytesRead, numBytesToRead);                    // Break when the end of the file is reached.
                    if (n == 0)
                        break;                    numBytesRead += n;
                    numBytesToRead -= n;
                }
                numBytesToRead = bytes.Length;
                
            }
上面的代码存储的是byte[] bytes类型数组编程流文件,我想是否能很方便的存储short[]类型数组,并且很方便读取成short[]类型数组?
请教怎么写