List<ProductList> InventoryList = new List<ProductList>();
StreamReader ipFile = new StreamReader(@"G:\superstore_inventory.csv");
outputListBox.Items.Clear();
while (!ipFile.EndOfStream)
string itemz = ipFile.ReadLine();
items = itemz.Split(',');
ProductList InvList = new ProductList();
InvList.ProductCode = items[0];
InvList.ProductName = items[1];
InvList.StartingQty =int.Parse(items[2]);
InvList.QtyMinRestock = int.Parse(items[3]);
InvList.QtySold = int.Parse(items[4]);
InvList.QtyRestocked = int.Parse(items[5]);
InvList.UnitPrice = double.Parse(items[6]);
string invOp = InvList.ProductCode.PadRight(12, ' ') +
InvList.ProductName.PadRight(23, ' ') +
InvList.StartingQty.ToString().PadRight(10, ' ') +
InvList.QtyMinRestock.ToString().PadRight(10, ' ') +
InvList.QtySold.ToString().PadRight(10, ' ') +
InvList.QtyRestocked.ToString().PadRight(10, ' ') +
InvList.UnitPrice.ToString("c").PadRight(10, ' ');
InventoryList.Add(InvList);
outputListBox.Items.Add(invOp);
MessageBox.Show(ex.Message);