Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Control.IDelegateEvent<'Delegate> Interface (F#)

First class event values for arbitrary delegate types.

Namespace/Module Path: Microsoft.FSharp.Control

Assembly: FSharp.Core (in FSharp.Core.dll)

type IDelegateEvent<'Delegate> =
  abstract this.AddHandler : 'Delegate -> unit
  abstract this.RemoveHandler : 'Delegate -> unit

F# gives special status to member properties compatible with type IDelegateEvent and tagged with the CLIEventAttribute. In this case the F# compiler generates approriate CLI metadata to make the member appear to other CLI languages as a CLI event.




Connect a handler delegate object to the event. A handler can be later removed using RemoveHandler. The listener will be invoked when the event is fired.


Remove a listener delegate from an event listener store.

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

© 2015 Microsoft