Advertisement
Guest User

Untitled

a guest
Nov 7th, 2021
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace PizzaCalories
  6. {
  7. public static class Validator
  8. {
  9. public static void ThrowIfNumberIsNotInRange(int minValue, int maxValue, int number, string exceptionMessage)
  10. {
  11. if (number < minValue || number > maxValue)
  12. {
  13. throw new ArgumentException(exceptionMessage);
  14. }
  15. }
  16. }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement