Επεξεργασία

Κοινή χρήση μέσω


SqlBytes.Write(Int64, Byte[], Int32, Int32) Method

Definition

Copies bytes from the passed-in buffer to this SqlBytes instance.

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

Parameters

offset
Int64

An Int64 long value offset into the value that is contained in the SqlBytes instance.

buffer
Byte[]

The byte array buffer to copy into.

offsetInBuffer
Int32

An Int32 integer offset into the buffer to start copying into.

count
Int32

An Int32 integer representing the number of bytes to copy.

Remarks

If this operation writes to a position beyond Length but within MaxLength, Length is updated to reflect the new ending position.

The value of offsetInBuffer must be less than or equal to Length. An exception is thrown otherwise. Only a value of 0 can be specified when writing to a null value instance.

If an attempt is made to write beyond MaxLength, an exception is thrown.

Applies to

See also