public WorkbookHeader(WorkbookRow row) { Type stringType = typeof(string); List <string> titles = new List <string>(row.Length); foreach (WorkbookCell cell in row) { if (cell.CellType != stringType) { throw new InvalidCastException($"Each cell in WorkbookRow must be a string cell to convert into WorkbookHeader."); } titles.Add((string)cell.Value); } Titles = titles; }
public bool Equals(WorkbookRow other) { if (Length != other.Length) { return(false); } for (int i = 0; i < Length; i++) { if (!_cells[i].Equals(other[i])) { return(false); } } return(true); }