Fun with contracts and anonymous delegates


I officially blew my own mind today. I discovered System.Diagnostics.Contracts and inline declaration and invocation of anonymous delegates all in the same day…

The call to Contract.Ensures is simply breathtaking!

Tags: Functional programming, Design by contract, C#

All content © 2018 Richard Cook. All rights reserved.