示例#1
0
        private void addtodiscards(Buy add)
        {
            Buy[] copy = this.discards;

            this.discards = new Buy[this.discards.Length + 1];

            int ii = 0;

            foreach (Buy b in copy)
            {
                this.discards[ii] = b;

                ii++;
            }

            this.discards[this.discards.Length - 1] = add;
        }
示例#2
0
        private void add(Buy add)
        {
            Buy[] inptbuys = new Buy[this.buys.Length];

            short ii = 0;

            foreach (Buy inptb in this.buys)
            {
                inptbuys[ii] = new Buy(inptb.stock, inptb.underage, inptb.dollar_amount);
                ii++;
            }

            this.buys = new Buy[this.buys.Length + 1];

            ii = 0;

            foreach (Buy otptb in inptbuys)
            {
                this.buys[ii] = new Buy(otptb.stock, otptb.underage, otptb.dollar_amount);
                ii++;
            }

            this.buys[ii] = add;
        }