/// <summary> /// Extends GetChars so that buffer offset of 0 and call to Array.Length are not needed. /// <example> /// dbdatarecord.GetChars(i, dataIndex, buffer); /// </example> /// </summary> public static Int64 GetChars(this DbDataRecord dbdatarecord, Int32 i, Int64 dataIndex, Char[] buffer) { if (dbdatarecord == null) { throw new ArgumentNullException("dbdatarecord"); } if (buffer == null) { throw new ArgumentNullException("buffer"); } return(dbdatarecord.GetChars(i, dataIndex, buffer, 0, buffer.Length)); }
public static long GetChars( this DbDataRecord dr, string columnName, long offset, char[] buffer, int bufferIndex, int length) { Check.ArgNotNull(dr, nameof(dr)); int ordinal = dr.GetOrdinal(columnName); return(dr.GetChars(ordinal, offset, buffer, bufferIndex, length)); }