Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Validator
- {
- public static void ValidatingName(string value)
- {
- if (string.IsNullOrWhiteSpace(value))
- {
- throw new ArgumentException("Name cannot be empty");
- }
- }
- public static void ValidatingMoney(decimal value)
- {
- if (value < 0)
- {
- throw new ArgumentException("Money cannot be negative");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement