public IfThenElement(Expression condition, IList<IElement> then, IList<IElement> @else) { if (condition.Type != typeof(bool)) throw new ArgumentException("Expected condition to be boolean.", "condition"); this.Condition = condition; this.Then = then; this.Else = @else; }