I am very new to F#, and I thought I would develop a simple winform calculator to strengthen my skills with F# and .NET. I ran into two problems which probably have very simple answers, however, I could not find any assistance from my resources.
First, I want to be able to change my textbox type to integer, so that when I press my "add" button the event will add the integers and not concatenate them. For example:
btnPlus.Click.Add(fun _ -> tb1.Text <- ("2") + ("2")) gives me 22 and not 4
How do I specify integer type for a textbox or integer type for values entered into a textbox?
My next question has to do with syntax. I was just wondering how to add multiple commands to an event. That is, in the above example, let say I wanted to add the two integers, plus open another form, and run a messagebox, after clicking the button. Do I just include commas between each command, such as: btnPlus.Click.Add(fun _ -> add integers, open form, messagebox) or is there something else involved?
I apologize for the sophomoric questions. There are not enough resources on F# and winforms as there are on F# and output (i.e. print, cmd, etc..)
Thank you,
DFM