Events and Delegates in F#

.net, c#, f#

Solution

I have played a lot with this and this is the code that work.

bar.add_Ready(fun msg -> Console.WriteLine(msg))

I don't know how theoreticly correct it is but it works fine.

Can any one confirm it is correct?

Problem

I don’t have any experience in F# but have a few lines of test code in C# for a framework I've made that I need to rewrite in F#. Any help would be appreciated. ``` bar.Ready += new Agent.ReadyHandler(bar_Ready); static void bar_Ready(string msg) { Console.WriteLine(msg.body); } ```

Original source