public Product(Product product) { this.Code = product.Code; this.Naam = product.Naam; this.Prijs = product.Prijs; }
private void InitProducten() { producten.Clear(); //TODO StreamReader file = new StreamReader(path + "producten.txt"); string lijn; while ((lijn = file.ReadLine()) != null) { string[] appart = lijn.Split('|'); Product pr = new Product(); pr.Code = Convert.ToString(appart[0]); pr.Naam = appart[1]; pr.Prijs = Convert.ToDecimal(appart[2]); producten.Add(pr); } file.Close(); }