private void FillProductSales() { productSalesResults = new Dictionary <string, ProductSales.Result>(); using (var file = File.OpenRead("../../Migration/Data/productSales.csv")) using (var reader = new StreamReader(file)) { var line = reader.ReadLine(); while (line != null) { var parts = line.Split(','); productSalesResults[parts[0]] = new ProductSales.Result { Product = parts[0], Count = (int)(double.Parse(parts[1], CultureInfo.InvariantCulture)), Total = double.Parse(parts[2], CultureInfo.InvariantCulture) }; line = reader.ReadLine(); } } }
private void FillProductSales() { productSalesResults = new Dictionary<string, ProductSales.Result>(); using (var file = File.OpenRead("../../Migration/Data/productSales.csv")) using (var reader = new StreamReader(file)) { var line = reader.ReadLine(); while (line != null) { var parts = line.Split(','); productSalesResults[parts[0]] = new ProductSales.Result { Product = parts[0], Count = (int)(double.Parse(parts[1], CultureInfo.InvariantCulture)), Total = double.Parse(parts[2], CultureInfo.InvariantCulture) }; line = reader.ReadLine(); } } }