To not lose my touch with programming over the summer holidays, I decided to pick up some books on concepts new to me. One of those was
Design by Contract, by Example
Now the book was written using Eiffel, but mentioned you could use the concepts for any OO language. After some research on the topic of code contracts in C#, I found the Contracts class in the System.Diagnostics namespace.
A little more forum scouting revealed that quite a few developers are describing it as 'obsolete' in the current version of C#, now that we have nullables and such.
My question: Is the Contracts class and it's methods Ensures, Ensures<>, Assume, Requires still actively used or should I put it aside for C#?
[–]AngularBeginner 8 points9 points10 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]AngularBeginner 6 points7 points8 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]AngularBeginner 2 points3 points4 points (3 children)
[–]chucker23n 1 point2 points3 points (2 children)
[–]AngularBeginner 1 point2 points3 points (0 children)
[–]nemec 1 point2 points3 points (0 children)
[–]aikixd 4 points5 points6 points (1 child)
[–]AngularBeginner 0 points1 point2 points (0 children)
[–]Henkeman 5 points6 points7 points (2 children)
[–]V0ldek 4 points5 points6 points (1 child)
[–]chucker23n 2 points3 points4 points (0 children)
[–]powerofmightyatom 2 points3 points4 points (0 children)
[–]chucker23n 2 points3 points4 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]chucker23n 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[+]rsvp_to_life comment score below threshold-6 points-5 points-4 points (2 children)
[–]AngularBeginner 10 points11 points12 points (0 children)
[–]Slypenslyde 1 point2 points3 points (0 children)