lørdag 15. desember 2012

Code contracts in C# - yes?

There isn't t much talk about C# code contracts, introduced in .NET 4 (as I can remember). Why?

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