public CheckedOutItem CreateCheckedOutItemFromLine(string line) { string[] items = line.Split(','); CheckedOutItem checkedOutItem = new CheckedOutItem(items[0], items[1], items[2], items[3], items[4], items[5], items[6]); return(checkedOutItem); }
//should be called when program is opened public void LoadLinkedList(string filePath) { string[] fileLines = File.ReadLines(filePath).ToArray(); foreach (string line in fileLines) { CheckedOutItem checkedOutItem = CreateCheckedOutItemFromLine(line); list.AddLast(checkedOutItem); } }
public void AddCheckedOutItemToList(CheckedOutItem checkedOutItem) { list.AddLast(checkedOutItem); }