The big advantage to code contracts is that they prevent null reference exceptions at compile time. Catching potential problems at compile time via static checking is preferable than throwing an exception at runtime. Your code is more resilient to bad data.<p>Having a formal checking mechanisms like code contracts also helps tools like Pex generate better sets of test inputs for automated unit testing.