Пример #1
0
        //---------------------------------------------------
        //Private Methods
        //---------------------------------------------------

        private void processLine(string line, IWineCollection wineItemCollection)
        {
            //declare array of parts that will contian the results of splitting the read in string
            string[] parts = line.Split(',');

            //Assign each part to a variable
            string id          = parts[0];
            string description = parts[1];
            string pack        = parts[2];

            //Add a new wine item into the collection with the properties of what was read in.
            wineItemCollection.AddNewItem(id, description, pack);
        }
Пример #2
0
        //---------------------------------------------------
        //Private Methods
        //---------------------------------------------------
        private void processLine(string line, IWineCollection wineItemCollection)
        {
            //declare array of parts that will contian the results of splitting the read in string
            string[] parts = line.Split(',');

            //Assign each part to a variable
            string id = parts[0];
            string description = parts[1];
            string pack = parts[2];
            decimal price = 0;

            //Add a new wine item into the collection with the properties of what was read in.
            wineItemCollection.AddNewItem(id, description, pack, price);
        }