예제 #1
0
파일: Product.cs 프로젝트: Mortion/Uses
 public Product(Product product)
 {
     this.Code = product.Code;
     this.Naam = product.Naam;
     this.Prijs = product.Prijs;
 }
예제 #2
0
        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();


        }