แก้ไข

แชร์ผ่าน


DataReaderExtensions.GetChars Method

Definition

Reads a specified number of characters from a specified column starting at a specified index, and writes them to a buffer starting at a specified position.

public:
[System::Runtime::CompilerServices::Extension]
 static long GetChars(System::Data::Common::DbDataReader ^ reader, System::String ^ name, long dataOffset, cli::array <char> ^ buffer, int bufferOffset, int length);
public static long GetChars (this System.Data.Common.DbDataReader reader, string name, long dataOffset, char[] buffer, int bufferOffset, int length);
static member GetChars : System.Data.Common.DbDataReader * string * int64 * char[] * int * int -> int64
<Extension()>
Public Function GetChars (reader As DbDataReader, name As String, dataOffset As Long, buffer As Char(), bufferOffset As Integer, length As Integer) As Long

Parameters

reader
DbDataReader

The data reader to get the column value from.

name
String

The name of the column.

dataOffset
Int64

The index within the row from which to begin the read operation.

buffer
Char[]

The buffer into which to copy the data.

bufferOffset
Int32

The index with the buffer to which the data will be copied.

length
Int32

The maximum number of characters to read.

Returns

The actual number of characters read.

Exceptions

The name specified is not a valid column name.

Applies to

See also