Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ICollection<Type> foodTypes = new List<Type> { typeof(Vegetable), typeof(Fruit) };
- // if (!foodTypes.Any(f => f.Name == food.GetType().Name))
- {
- string exceptionMessages = String.Format(ExceptionMessages.InvalidFoodException, this.GetType().Name, food.GetType().Name);
- throw new ArgumentException(exceptionMessages);
- }
Add Comment
Please, Sign In to add comment