Calling a C# overloaded method with out parameters from F# -


i have following f# code handle gtk.treeview event:

  tree.cursorchanged.add(fun (e : eventargs) ->        let selection = tree.selection       let mutable iter = new treeiter ()       if selection.getselected(&iter)         console.writeline("path of selected row = {0}", model.getpath(iter))       ) 

selection.getselected has 2 overloads, signatures

bool getselected(out treeiter, out itreemodel) 

and

bool getselected(out treeiter) 

which preventing me using tuple-returning version described in this post:

let selection = tree.selection match selection.getselected() | true, iter -> // success | _ -> // failure 

is there way specify getselected overload want latter syntax?

edit: clarify question, know method signature want; don't know how specify it. instance, tried this, didn't work:

let f : (byref<treeiter> -> bool) = selection.getselected match f() | true, iter -> // success | _ -> // failure 

i think

match selection.getselected() : bool*_ ... 

should work.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo