Why are both "expression" and "value" passed in as parameters, when you can derive the value from the expression?
example:
publicstaticvoid NotNull<T>(Expression<Func<T>> reference) { T value = reference.Compile()();if (value == null)thrownew ArgumentNullException(GetParameterName(reference), "Parameter cannot be null."); }
Is Compile so expensive you must also pass in the value separately?