Closure Tip
In C# 2 and greater you have the ability to write closures. A closure is a function that is evaluated in an environment containing one ore more bound variables[1]. In C# 2 this is done by creating an anonymous method that accesses a variable declared outside the body of the anonymous method. Writing closures (which can evolve from an anonymous method that is not a closure) must be very deliberate and must be given great attention. Closures offer a very specific way of essentially creating code at runtime based on runtime values. But, with closures, they can be bound to … Continue reading Closure Tip