private static void DeserializeInvoice() { List <Invoice> iList = objValidation.DeserializeInvoiceBLL(); objValidation = new InvoiceBLL(); try { Console.WriteLine("Records from File:"); foreach (Invoice inv in iList) { Console.WriteLine("Invoice No: {0}", inv.InvoiceNo); Console.WriteLine("Invoice Date: {0}", inv.InvoiceDate); Console.WriteLine("Customer Name: {0}", inv.CustomerName); Console.WriteLine("Product Name : {0}", inv.ProductName); Console.WriteLine("Amount : {0}", inv.Amount); } } catch (InvoiceException ex) { Console.WriteLine(ex.Message); } catch (IOException ex) { Console.WriteLine(ex.Message); } catch (Exception ex) { Console.WriteLine(ex.Message); } }