Casting a scriptblock to an arbitrary delegate signature

Arild asked the following in http://arildf.spaces.msn.com/blog/cns!E99F8B43533149B0!140.entry?_c%3dBlogPart : PSMDTAG:FAQ: Delegates – how to cast a scriptblock to an arbitrary delegate signature? ANSWER – You can’t in V1.0. In version 1.0 Windows PowerShell only supports casting scriptblocks to delegates with the signature: void Method(Object Sender, object e) For instance, here is a WinForms script which uses a scriptblock delegate when a… Read more