I use library 3.5 for contracts with Microsoft code
public object RetrieveById(int Id) {
I get a compiler message: "Error 18 of the contract section in the try block in the method" Controller.RetrieveById (System.Int32) "
UPDATE:
I figured this out with your help:
- Go to the top of the page
Check out the contract. Result
Contract.Ensures (Contract.Result ()! = Null, "the object must not be null");
c # code-contracts
Matthew martin
source share