Export (0) Print
Expand All

SqlBytes.Read Method

Note: This method is new in the .NET Framework version 2.0.

Copies bytes from this SqlBytes instance to the passed-in buffer and returns the number of copied bytes.

Namespace: System.Data.SqlTypes
Assembly: System.Data (in system.data.dll)

public long Read (
	long offset,
	byte[] buffer,
	int offsetInBuffer,
	int count
)
public long Read (
	long offset, 
	byte[] buffer, 
	int offsetInBuffer, 
	int count
)
public function Read (
	offset : long, 
	buffer : byte[], 
	offsetInBuffer : int, 
	count : int
) : long

Parameters

offset

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

buffer

The byte array buffer to copy into.

offsetInBuffer

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

count

An Int32 integer representing the number of bytes to copy.

Return Value

An Int64 long value representing the number of copied bytes.

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

If count specifies more bytes to be copied than are available from the offset to the end of the value, only the available bytes 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.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft