/// <summary> /// Load from a text file into the Item list /// </summary> protected void Load() { List <Item> results = new List <Item>(); StreamReader sr = null; try { sr = new StreamReader(FILENAME); string row = ""; while ((row = sr.ReadLine()) != null) { Item c = ItemMapper.ToObject(row); results.Add(c); } Items = results; } catch (FileNotFoundException fileNotFound) { Console.WriteLine(fileNotFound.FileName + " was not found"); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { if (sr != null) { sr.Close(); } } }