XsFileStream.Lock 方法 | |
Prevents other processes from reading from or writing to the FileStream.
命名空间:
XSharp.IO
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法 VIRTUAL METHOD Lock(
position AS INT64,
length AS INT64
) AS VOID
public override void Lock(
long position,
long length
)
查看代码参数
- position
- 类型:Int64
The beginning of the range to lock. The value of this parameter must be equal to or greater than zero (0). - length
- 类型:Int64
The range to be locked.
异常 异常 | 条件 |
---|
ArgumentOutOfRangeException | position or length is negative. |
ObjectDisposedException | The file is closed. |
IOException | The process cannot access the file because another process has locked a portion of the file. |
参见