Tech Off Post

Single Post Permalink

View Thread: Contract.Requires(argument != null); // superfluous?
  • User profile image
    Frank Hileman

    @exoteric:How do you know that Repeat is not designed to throw a null reference exception when passed a null reference? If that is the behavior desired, you would not want Contract.Requires(source != null). I agree that in most cases you want that inferred, but unless you can infer 100% of the time...