Пример #1
0
        public NectarUnit[] EmptyVat(NectarVat vat)
        {
            NectarUnit[] vatUnits;

            if (vat.Units.Count > 0)
            {
                vatUnits = new NectarUnit[vat.Units.Count];
                for (int i = 0; i < vatUnits.Length; i++)
                {
                    vatUnits[i] = vat.Units[i];
                }
                return vatUnits;
            }
            else
            {
                throw new VatEmptyException("The vat has been emptied!");
            }
        }
Пример #2
0
        public NectarUnit[] EmptyVat(NectarVat vat)
        {
            NectarUnit[] vatUnits;

            if (vat.Units.Count > 0)
            {
                vatUnits = new NectarUnit[vat.Units.Count];
                for (int i = 0; i < vatUnits.Length; i++)
                {
                    vatUnits[i] = vat.Units[i];
                }
                return(vatUnits);
            }
            else
            {
                throw new VatEmptyException("The vat has been emptied!");
            }
        }