SqlChars.Read(Int64, Char[], Int32, Int32) 方法
定义
public:
long Read(long offset, cli::array <char> ^ buffer, int offsetInBuffer, int count);
public long Read (long offset, char[] buffer, int offsetInBuffer, int count);
member this.Read : int64 * char[] * int * int -> int64
Public Function Read (offset As Long, buffer As Char(), offsetInBuffer As Integer, count As Integer) As Long
参数
- offset
- Int64
SqlChars 实例中所含值的 Int64long 值偏移量。An Int64long value offset into the value that is contained in the SqlChars instance.
- buffer
- Char[]
向其复制的字符数组缓冲区。The character array buffer to copy into.
- offsetInBuffer
- Int32
缓冲区中的一个 Int32 整数偏移量,以启动“复制到”操作。An Int32 integer offset into the buffer to start copying into.
- count
- Int32
一个 Int32 整数值,表示要复制的字符数。An Int32 integer value representing the number of characters to copy.
返回
表示已复制字节数的 Int64long 值。An Int64long value representing the number of copied bytes.
注解
如果尝试进行读取 MaxLength ,则会引发异常。If an attempt is made to read beyond MaxLength, an exception is thrown.
如果 count 指定的要复制的字符数超过了从 offsetInBuffer 到值的末尾,则仅复制可用字符。If count specifies more characters to be copied than are available from the offsetInBuffer to the end of the value, only the available characters are copied.
如果目标缓冲区为空引用,则会引发异常。An exception is thrown if the destination buffer is a null reference.
如果目标缓冲区无法接收所请求的字符数,则会引发异常。An exception is thrown if the destination buffer cannot receive as many characters as requested.