Jon Skeet mentions it in his latest C# book, and he has good expectations And it goes hand in hand with a test-driven style of coding. Which is what I believe developers still strive to do.
It would be nice to have contracts:
- in your NuGet packages
- in legacy code
- when writing new tests
- for documentation
- for logging precise error information
- ...
Read about Code contract here - http://msdn.microsoft.com/en-us/library/dd264808.aspx
Ingen kommentarer:
Legg inn en kommentar