/// <summary> /// Removes the record at the specified index. /// </summary> /// <param name="index">The index.</param> /// <returns>The removed record an the value associate to it.</returns> /// <exception cref="ArgumentOutOfRangeException"></exception> public (CsvRecord, T) RemoveAt(int index) { if (index < 0 || index >= Count) { throw new ArgumentOutOfRangeException(index.ToString()); } TypedCsvRecord <T> typedRecord = _records[index]; _records.RemoveAt(index); return(typedRecord.ToTuple()); }
/// <summary> /// Updates the record at the specified index with the given value. /// </summary> /// <param name="index">The index.</param> /// <param name="value">The value.</param> public void Update(int index, T value) { _records[index] = new TypedCsvRecord <T>(value, Format); }