DevLabs > DevLabs Forums > Code Contracts
Ask a questionAsk a question
 

Code Contracts

Discuss and provide feedback on Code Contracts.

Announcements

  • Welcome to Code Contracts for .NET

    Mike BarnettMSFTFriday, February 20, 2009 2:28 AM
    We are so happy that you are interested in Code Contracts! You are at exactly the right place for learning how to use contracts from any .NET language to:
    • Specify method preconditions for expressing conditions that a caller must meet in order to call a method.
    • Specify method postconditions for expressing conditions that the implementation of a method must meet before returning. Conditions can be specified for both normal termination as well as exceptional termination.
    • Specify object invariants that describe the healthy states for an instance of a class.

     

    We currently provide three tools for making use of contracts:

    • A binary rewriter that operates as a post-build step to inject the contracts into the appropriate places for them to be evaluated at runtime.
    • A static checker that operates as a post-build step to analyze your code without even executing it for potential contract violations.
    • A documentation generator that adds information about the contracts to the XML documentation files for your project.

    The installer for these tools is available for either commercial or non-commercial use.

    We welcome you to use the forum to ask questions about how to use contracts and the tools, to make suggestions for how we can improve, and --- if you really must --- to report bugs and problems.

    You can also check out our home page at Microsoft Research.

  • Okay, Release 1.2.30118.5 is now ready for download.

    Mike BarnettMSFTWednesday, January 13, 2010 11:42 PM
    A new release of Code Contracts is now live. So much for our once-a-month release schedule... We know it has been a long time, but we hope that this release will help make it up to you! Check out the release notes for the details. Besides the usual bucket o' bug fixes, we've added Silverlight 4 support.

    Please keep using the forum for communicating with us. If you have any examples of bugs that you've found using Code Contracts or feel that it has saved you time, then we'd really love to hear about it.
12345678910 ... 3435>>(Showing 1 to 20 of 697)
RepliesViews