简体   繁体   English

返回变量F#(机盖)的最简单方法

[英]returning variables F#(canopy) easiest way

 member x.Logovani(window : string) =
            let weburl = ref ""   
            let actwindow = ref ""     

            "Login" &&& fun _ ->
                browser.SwitchTo().Window(window) |> ignore
                weburl := currentUrl()
                actwindow := browser.CurrentWindowHandle
                return {|weburl,actwindow|}
 end

Hello my question is how to pass weburl and actwindow easiest way, because the way of my return is not working. 您好,我的问题是如何通过weburlactwindow最简单的方法,因为return的方式不起作用。 I want to call function Logovani pass to that function var window and then recieved weburl and actwindow 我想调用函数Logovani传递给该函数var window ,然后接收weburlactwindow

so finally i fixed it like this 所以最后我像这样修复了它

 member x.Logovani(window : string) : string ref =
            let weburl = ref ""   
                browser.SwitchTo().Window(window) |> ignore
                weburl := currentUrl()
            weburl
 end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM