ignore let stuffHandler = new ...">

F # function parameters

I have 2 lines of code here:

let stuff _ _ = MessageBox.Show("This is doing stuff") |> ignore
let stuffHandler = new EventHandler(stuff)

      

I just started with F # and would like to know why the code doesn't compile if I remove the underscores from the substance variable? As far as I know, underline means to ignore something that should be ignored here?

+3


source to share


1 answer


The EventHandler delegate expects a function with two parameters, a sender and an EventArgs.



+6


source







All Articles