A lot of projects that I’ve seen use a static Guard class.
public static class Guard {
public static void ArgumentIsNotNull(object value, string argument) {
if (value == null)
throw new ArgumentNullException(argument);
}
}
It makes the code a lot cleaner, in my opinion.
Guard.ArgumentIsNotNull(arg1, "arg1");