Skip to content

Instantly share code, notes, and snippets.

@andybrackley
Created February 23, 2014 20:16
Show Gist options
  • Save andybrackley/9176624 to your computer and use it in GitHub Desktop.
Save andybrackley/9176624 to your computer and use it in GitHub Desktop.
(* Events *)
type ClassWithEvent() =
let event1 = new Event<_>()
[<CLIEvent>]
member this.Event1 = event1.Publish
let clsWithEvent = ClassWithEvent().Event1.Add ( fun arg -> printfn "Argg" )
let viaReactive = ClassWithEvent().Event1 |> Observable.subscribe( fun arg -> printfn "Arrgg" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment