Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset.

Namespace: System.Extensions.Data
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static long GetNullableBytes(
	this IDataRecord reader,
	int index,
	long fieldOffset,
	byte[] buffer,
	int bufferOffset,
	int length
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function GetNullableBytes ( 
	reader As IDataRecord,
	index As Integer,
	fieldOffset As Long,
	buffer As Byte(),
	bufferOffset As Integer,
	length As Integer
) As Long
Visual C++
public:
[ExtensionAttribute]
static long long GetNullableBytes(
	IDataRecord^ reader, 
	int index, 
	long long fieldOffset, 
	array<unsigned char>^ buffer, 
	int bufferOffset, 
	int length
)
F#
static member GetNullableBytes : 
        reader : IDataRecord * 
        index : int * 
        fieldOffset : int64 * 
        buffer : byte[] * 
        bufferOffset : int * 
        length : int -> int64 

Parameters

reader
Type: System.Data..::..IDataRecord
The reader to retrieve the value from.
index
Type: System..::..Int32
The zero-based column ordinal.
fieldOffset
Type: System..::..Int64
The index within the field from which to begin the read operation.
buffer
Type: array<System..::..Byte>[]()[][]
The buffer into which to read the stream of bytes.
bufferOffset
Type: System..::..Int32
The index for buffer to begin the write operation.
length
Type: System..::..Int32
The maximum length to copy into the buffer.

Return Value

Type: Int64
The actual number of bytes read.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataRecord. 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