// Get By Province Code Method
        public BPProvince BPGetByProvinceCode(string inputCode)
        {
            try
            {
                BPProvince province = new BPProvince(); // creating instance to call BPProvince Class
                using (StreamReader sr = new StreamReader(fileLocation))
                {
                    while (!sr.EndOfStream)
                    {
                        province = BPParseProvince(sr.ReadLine());

                        if (province.ProvinceCode == inputCode)
                        {
                            return(province);
                        }
                    }
                }
                return(null);
            }
            catch (Exception ex)
            {
                throw new Exception("Error converting Record to Province "
                                    + ex.Message);
            }
        }
 // Parse Province Method
 public BPProvince BPParseProvince(string record)
 {
     try
     {
         string[] fields =
             record.Split(new string[] { "|" }, StringSplitOptions.None);
         string newRecords = fields[1] + " ";
         newRecords += fields[2];
         BPProvince province = new BPProvince();
         province.Name               = fields[1];
         province.CountryCode        = fields[2];
         province.TaxCode            = fields[3];
         province.TaxRate            = Double.Parse(fields[4]);
         province.ProvinceCode       = fields[0];
         province.IncludesFederalTax = Convert.ToBoolean(fields[5]);
         return(province);
     }
     catch (Exception ex)
     {
         throw new Exception("Error converting Record to Province "
                             + ex.Message);
     }
 }