FileStreamExensions.SafeWriteAt Method (FileStream, Int64, Byte)
|
|
Write data at a location in the file. Makes sure that file locations are >= 0. Assumes whole buffer must be written.
命名空间:
XSharp
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.24 GA
Syntax STATIC METHOD SafeWriteAt(
SELF oStream AS FileStream,
pos AS INT64,
buffer AS BYTE[]
) AS LOGIC
public static bool SafeWriteAt(
this FileStream oStream,
long pos,
byte[] buffer
)
Request Example
查看代码Parameters
- oStream
- 类型:FileStream
要写入的流。 - pos
- 类型:Int64
开始写入的位置。 - buffer
- 类型:Byte
必须写入的缓冲区。
Return Value
类型:
Logic当成功时为 TRUE,当发生异常或参数不正确时为 FALSE。
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
FileStream. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also