gpt4 book ai didi

c# - 为什么 FileStream.Length 是 long 类型,但 FileStream.Read 参数 - offset 的长度较短?

转载 作者:太空狗 更新时间:2023-10-29 18:18:46 26 4
gpt4 key购买 nike

为什么 FileStream.Length 是 long 类型,但 FileStream.Read 参数 - offset 有更短的长度 int 呢?

布莱恩

最佳答案

offset 参数告诉从哪里开始写入数组中的数据,array 参数。它没有指出文件数据中的偏移量。

The offset parameter gives the offset of the byte in array (the buffer index) at which to begin reading, and the count parameter gives the maximum number of bytes to be read from this stream. The returned value is the actual number of bytes read, or zero if the end of the stream is reached. If the read operation is successful, the current position of the stream is advanced by the number of bytes read. If an exception occurs, the current position of the stream is unchanged.

来源:FileStream.Read

关于c# - 为什么 FileStream.Length 是 long 类型,但 FileStream.Read 参数 - offset 的长度较短?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13579190/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com