Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an anonymous event with the given handlers.
Namespace/Module Path: Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature:
RuntimeHelpers.CreateEvent : ('Delegate -> unit) -> ('Delegate -> unit) -> ((obj -> 'Args -> unit) -> 'Delegate) -> IEvent<'Delegate,'Args> (requires delegate)
// Usage:
RuntimeHelpers.CreateEvent addHandler removeHandler createHandler
Parameters
addHandler
Type: 'Delegate -> unitA function to handle adding a delegate for the event to trigger.
removeHandler
Type: 'Delegate -> unitA function to handle removing a delegate that the event triggers.
createHandler
Type: (obj -> 'Args -> unit) -> 'DelegateA function to produce the delegate type the event can trigger.
Return Value
The initialized event as an object that implements IEvent.
Platforms
Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2
Version Information
F# Runtime
Supported in: 2.0, 4.0
Silverlight
Supported in: 3