logoalt Hacker News

nilirlyesterday at 10:32 AM1 replyview on HN

Is the idea of the runtime contracts similar to the idea of runtime validation? Or are they different in some way?


Replies

pramodbiligiriyesterday at 10:47 AM

It is described in the "Code Contracts" section of the article: "Code contracts specify preconditions, postconditions, and invariants for critical functions. These contracts are converted into runtime asserts during testing but can be disabled in production builds for performance". The .NET framework article that he links to: https://learn.microsoft.com/en-us/dotnet/framework/debug-tra...

show 2 replies