views:

68

answers:

2

Are you using CodeContracts? Do you know about any decent-sized project out there which uses is?

A: 

No. But if I where to start a new, large sized project now on .NET 4, I would use them.

There is little effort in putting them in new code; but a larger effort in legacy code. So I believe it will only be cost-effective for a new codebase.

That being said, as code contracts becomes more popular, I am anticipating new tools being released that will make use of them - one such tool being Pex.

driis
Hi,I just wanted to know how they would play with a large domain with a 4-5 deep inheritance chain.
SharePoint Newbie
..and can I make some savings writing tests for some of the edge cases if I can specify them explicitly in a contract?Null params, etc.
SharePoint Newbie
A: 

Yes, I am.

And actually, Code Contracts are implemented on classes and methods in the .NET 4.0 Base class libraries. That's a decent-sized project =)

I believe that for example the IList interface has some contracts defined on it.

KoMet