Related to this question: How to specify Ensures for out parameter?
How can I do this for the Ensures.Requires()
-method?
In my case, I used the out
-keyword incorrectly.
As Matthew Watson said, I have to use ref
-parameter.
So I have no more problems with Contract.Requires()
.