1.if (myReader.Read()){
string fileName = @"C:\Patient" + ".bmp";
fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
bw = new BinaryWriter(fs);
byte[] outbyte = new byte[bufferSize];
startIndex = 0;
retval = myReader.GetBytes(1, startIndex, outbyte, 0, bufferSize);
哪位哥哥帮我解释下
myReader.GetBytes(1, startIndex, outbyte, 0, bufferSize);
里面 第一,二,四个参数是啥意思?
int i,
long dataIndex,
byte[] buffer,
int bufferIndex,
int length
)
参数
i
类型:System.Int32
从零开始的列序号。dataIndex
类型:System.Int64
字段中的索引,从其开始读取操作。buffer
类型:System.Byte[]
要将字节流读入的缓冲区。bufferIndex
类型:System.Int32
buffer 中写入操作开始位置的索引。length
类型:System.Int32
要复制到缓冲区中的最大长度。返回值
类型:System.Int64
读取的实际字节数。
int i,
long dataIndex,
byte[] buffer,
int bufferIndex,
int length
)
参数
i
类型:System.Int32
从零开始的列序号。dataIndex
类型:System.Int64
字段中的索引,从其开始读取操作。buffer
类型:System.Byte[]
要将字节流读入的缓冲区。bufferIndex
类型:System.Int32
buffer 中写入操作开始位置的索引。length
类型:System.Int32
要复制到缓冲区中的最大长度。返回值
类型:System.Int64
读取的实际字节数。