IDataRecord.GetChars(Int32, Int64, Char[], Int32, Int32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.
public:
long GetChars(int i, long fieldoffset, cli::array <char> ^ buffer, int bufferoffset, int length);
public long GetChars(int i, long fieldoffset, char[]? buffer, int bufferoffset, int length);
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length);
abstract member GetChars : int * int64 * char[] * int * int -> int64
Public Function GetChars (i As Integer, fieldoffset As Long, buffer As Char(), bufferoffset As Integer, length As Integer) As Long
- i
- Int32
The zero-based column ordinal.
- fieldoffset
- Int64
The index within the row from which to start the read operation.
- buffer
- Char[]
The buffer into which to read the stream of bytes.
- bufferoffset
- Int32
The index for buffer
to start the read operation.
- length
- Int32
The number of bytes to read.
The actual number of characters read.
The index passed was outside the range of 0 through FieldCount.
GetChars returns the number of available characters in the field. Frequently this is the exact length of the field. However, the number returned may be less than the exact length of the field if GetChars
has already been used to obtain characters from the field.
If you pass a buffer that is null
, GetChars
returns the length of the field in characters.
No conversions are performed; therefore the data retrieved must already be a character array.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: