예제 #1
0
        public static Produit CreerDepuisCodeBarres(string codeBarres)
        {
            Produit res = new Produit(codeBarres);

            res.ChargerInfosOpenFoodFacts();
            return(res);
        }
예제 #2
0
        public static Produit CreerDepuisLigneCsv(string ligne, char sep)
        {
            string[] elements = ligne.Split(sep);
            Produit  res      = new Produit(elements[0]);

            res.Nb  = Convert.ToUInt32(elements[1]);
            res.Nom = elements[2];
            res.ChargerInfosOpenFoodFacts();
            return(res);
        }