Hi
I have a problem getting the following code to work.
open System
open System.ComponentModel
open System.Threading
let triggerEvent (state : Object) = Console.Write("Do Something.")
let asyncContext = AsyncOperationManager.CreateOperation(null)
asyncContext.PostOperationCompleted(triggerEvent, null)
I get an error, that triggerEvent is of type 'a -> unit instead of SendOrPostCallback. SendOrPostCallback is of type Object -> unit. I am wondering why triggerEvent is of type 'a -> unit instead of Object -> unit. I explicitly declared state as Object and still it is 'a.
Any suggestions? Thank you.