Esempio n. 1
0
        /// <summary>
        /// Full constructor.
        /// </summary>
        /// <param name="newValue">Value to be assigned for this item</param>
        /// <exception cref="ArgumentException"></exception>
        public AnswerBoolean(TriStateQuestion newValue)
        {
            switch (newValue)
            {
            case TriStateQuestion.EMPTY:
            case TriStateQuestion.FALSE:
            case TriStateQuestion.TRUE:
                Value = newValue;
                break;

            default:
                throw new ArgumentException("Object cannot initialize with the value provided.", "newValue");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public AnswerBoolean()
 {
     Value = TriStateQuestion.EMPTY;
 }