public int Append(object[][] records) { if (records == null) { throw new ArgumentNullException(nameof(records)); } var newrows = new object[Records.Length + records.Length][]; Records.CopyTo(newrows, 0); records.CopyTo(newrows, Records.Length); Records = newrows; return(records.Length); }
public int Append(List <List <object> > records) { if (records == null) { throw new ArgumentNullException(nameof(records)); } var newRecordCount = Records.Length + records.Count; var newrows = new object[newRecordCount][]; Records.CopyTo(newrows, 0); for (var i = Records.Length; i < newRecordCount; ++i) { newrows[i] = records[i - Records.Length].ToArray(); } Records = newrows; return(records.Count); }
/// <summary> /// Copies the delimited file to an array /// </summary> /// <param name="array">Array to copy to</param> /// <param name="arrayIndex">Index to start at</param> public void CopyTo(RecordType[] array, int arrayIndex) { Records.CopyTo(array, arrayIndex); }