示例#1
0
        private void RightToLeft()
        {
            foreach (var summand in RightSide)
            {
                summand.Multiplier *= -1;
            }

            LeftSide = LeftSide.Concat(RightSide).ToList();
            RightSide.Clear();
        }
        /// <summary>
        /// Returns an array of the names all of the elements used in this equation.
        /// The array represents a set, so the items are in an arbitrary order and no item is repeated.
        /// </summary>
        public List <string> GetElements()
        {
            var result    = new List <string>();
            var bothSides = LeftSide.Concat(RightSide);

            foreach (var item in bothSides)
            {
                item.GetElements(result);
            }
            return(result);
        }