SqlChars.Write(Int64, Char[], Int32, Int32) SqlChars.Write(Int64, Char[], Int32, Int32) SqlChars.Write(Int64, Char[], Int32, Int32) SqlChars.Write(Int64, Char[], Int32, Int32) Method

定义

将传入缓冲区中的字符复制到此 SqlChars 实例中。Copies characters from the passed-in buffer to this SqlChars instance.

public:
 void Write(long offset, cli::array <char> ^ buffer, int offsetInBuffer, int count);
public void Write (long offset, char[] buffer, int offsetInBuffer, int count);
member this.Write : int64 * char[] * int * int -> unit
Public Sub Write (offset As Long, buffer As Char(), offsetInBuffer As Integer, count As Integer)

参数

offset
Int64 Int64 Int64 Int64

SqlChars 实例中所含值的 long 值偏移量。A long value offset into the value that is contained in the SqlChars instance.

buffer
Char[]

向其复制的字符数组缓冲区。The character array buffer to copy into.

offsetInBuffer
Int32 Int32 Int32 Int32

缓冲区中的一个 Int32 整数偏移量,以启动“复制到”操作。An Int32 integer offset into the buffer to start copying into.

count
Int32 Int32 Int32 Int32

一个 Int32 整数,表示要复制的字符数。An Int32 integer representing the number of characters to copy.

注解

如果此操作会将写入到的位置超出Length之内MaxLengthLength更新以反映新的结束位置。If this operation writes to a position beyond Length but within MaxLength, Length is updated to reflect the new ending position.

offsetInBuffer必须小于或等于LengthThe value of offsetInBuffer must be less than or equal to Length. 否则将引发异常。An exception is thrown otherwise. 写入到的 null 值实例时,可以指定的值为 0。Only a value of 0 can be specified when writing to a null value instance.

如果尝试写入超过MaxLength,将引发异常。If an attempt is made to write beyond MaxLength, an exception is thrown.

适用于

另请参阅