private void AddOfferVoucher(OfferVoucher voucher) { if (Discounts.Count(x => x.GetType() == typeof(OfferVoucher)) > 0) { ErrorInBasket = true; ErrorMessage = "You can only have one offer voucher active at one time"; return; } string errorMessage = string.Empty; if (!voucher.DiscountIsValidForBasket(this, out errorMessage)) { ErrorInBasket = true; ErrorMessage = errorMessage; return; } }