/// <summary>Get rows as object</summary>
/// <typeparam name="T">Object type</typeparam>
/// <param name="index">Index</param>
/// <param name="mapping">Override mapping</param>
/// <returns>Object</returns>
public IEnumerable<T> AsObjects<T>(int index, Dictionary<int, CsvMapping> mapping = null) where T : new()
{
if (index < 0 || index > this.CountRows)
throw new ArgumentException("Invalid index", nameof (index));
foreach (string[] row in this.Rows)
yield return CsvParser.Map<T>(row, mapping ?? this.Mapping);
}
the index is only used to throw an error if its out of range but otherwise its not used
the
indexis only used to throw an error if its out of range but otherwise its not used