I’m currently using F# and XNA for my new project, but got stuck when implementing XNA’s IUpdateable interface. Specifically when I need to implement the event handlers.
This is what I have:
let enabledChanged = new DelegateEvent<System.EventHandler>()
and further down:
interface IUpdateable with
... // other stuff
[<CLIEvent>]
member self.EnabledChanged = enabledChanged.Publish
But i’m getting this error:
Error 2 This expression was expected to have type EventHandler but here has type EventHandler<EventArgs>
I’ve tried several things but can’t get this to work. What is expected to be there?
Thanks in advance!
Have you tried defining
enabledChangedin the following way?