Skip to content

Commit

Permalink
Create documentation #13
Browse files Browse the repository at this point in the history
- started 'nullability checks' section
  • Loading branch information
MarcinCelej authored Sep 8, 2016
1 parent c376f36 commit 456c105
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ To make sure your contract is checked during code execution you should add const

## idea

Let us not explain the basics of DbC programming. What we believe is that the constraint checks should be checked not only in development phase but also on site. That's why the Fails you add to your code are compiled with it. Why? We believe that all constraint violations should be found during development but... Sometimes live shows that they are not. Therefore when there is such a situation you know what were wrong.
Let us not explain the basics of DbC programming. What we believe is that the constraint checks should be checked not only in development phase but also on site. That's why the Fails you add to your code are compiled with it. Why? We believe that all constraint violations should be found during development but... Sometimes live shows that they are not. Therefore when there is such a situation you know more when you see `'firstName' was an empty string` instead of NullReferenceException.

## nullability checks

The most commonly occuring exception in .NET world is `NullReferenceException`. Therefor it is good to have a strategy for dealing with null in your code. Here is a list we prefer to use:
- 80% of code assumes that argument, property or variable is `[NotNull]` (should never be null)

0 comments on commit 456c105

Please sign in to comment.