Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace PizzaCalories
- {
- public static class Validator
- {
- public static void ThrowIfNumberIsNotInRange(int minValue, int maxValue, int number, string exceptionMessage)
- {
- if (number < minValue || number > maxValue)
- {
- throw new ArgumentException(exceptionMessage);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement