Late-bound Delegate Creation, Once Again
Saturday, April 9, 2005
With Whidbey, late-bound delegate creation, that is, instantiating a delegate for an event and/or a handler determined at runtime, is finally as flexible as I've ever wanted it to be.
The System.Delegate.CreateDelegate routine, with its thirteen (as of Whidbey Beta 1) overloads supports:
- Using public or private, instance or static handler methods.
- Delegate relaxation, analogous to C# method group conversions.
See here for an example.