5 ms·
Once I tried to use them, but forgot what was the issue... first of all - couldn't easily google on how to use it and then I think some legacy stuff was there t
by jve 5y ago
Once I tried to use them, but forgot what was the issue... first of all - couldn't easily google on how to use it and then I think some legacy stuff was there that couldn't be used in .NET 4.7
> Code contracts aren't supported in .NET 5+ (including .NET Core versions). Consider using Nullable reference types instead.
https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/code-contracts https://docs.microsoft.com/en-us/dotnet/framework/debug-trac...
I didn't work any .NET Core version, but... could someone maybe provide some material/blogs/examples on how Contracts are to be used?
Statically verifiable arguments (where possible) are a dream that hasn't yet come true for me...
- int_19h 5y agoYep, it has been effectively deprecated for a while, and now gone in new .NET versions. But when it was there, there was a static checker that you could run, and I thought that's where all the Spec# bits ended up in. .NET 5+ basically doesn't have anything like contracts out of the box anymore.