public override object this[int ordinal]
{
get
{
ValidateOpen("Item");
ValidateReader();
if ((_currentDataRow == null) || (_currentDataRow.RowState == DataRowState.Deleted))
{
ReaderIsInvalid = true;
throw ExceptionBuilder.InvalidDataTableReader(_currentDataTable.TableName);
}
try
{
return _currentDataRow[ordinal];
}
catch (IndexOutOfRangeException e)
{
// thrown by DataColumnCollection
ExceptionBuilder.TraceExceptionWithoutRethrow(e);
throw ExceptionBuilder.ArgumentOutOfRange(nameof(ordinal));
}
}
}