Exemple #1
0
        public void AddAnswerItem(AnswerItem ansItem)
        {
            bool isExisted = false;

            for (int i = 0; i < this.ansItems.Count; i++)
            {
                if (this.ansItems[i].GetValueName().ToUpper() == ansItem.GetValueName().ToUpper())
                {
                    this.ansItems[i] = ansItem;
                    isExisted = true;
                    break;
                }
            }

            if (!isExisted)
                this.ansItems.Add(ansItem);
        }
Exemple #2
0
        public void AddAnswerItem(AnswerItem ansItem)
        {
            bool isExisted = false;

            for (int i = 0; i < this.ansItems.Count; i++)
            {
                if (this.ansItems[i].GetValueName().ToUpper() == ansItem.GetValueName().ToUpper())
                {
                    this.ansItems[i] = ansItem;
                    isExisted        = true;
                    break;
                }
            }

            if (!isExisted)
            {
                this.ansItems.Add(ansItem);
            }
        }