使用F#和#x2B;天蓬

使用F#和#x2B;天蓬,f#,canopy-web-testing,F#,Canopy Web Testing,我已经使用了以下链接作为参考,但仍然无法让我的代码打印HTML <title>This is the title</title> 使用此代码: let title() = @"<title>This is the title</title>" printfn "Page title is: %s" (title()) Page title is: <title>This is the title</title> let

我已经使用了以下链接作为参考,但仍然无法让我的代码打印HTML

<title>This is the title</title>
使用此代码:

let title() = @"<title>This is the title</title>"
printfn "Page title is: %s" (title())
Page title is: <title>This is the title</title>
let title()=@“这就是标题”
printfn“页面标题为:%s”(标题())
页面标题是:这是标题

我得到了预期的结果。由于F#类型推断的限制,当你说“不要打印我期望的内容”时,你需要在
title()

周围使用一对括号。最好显示他们实际打印的内容。我在我“期望”看到的内容中对问题进行了更详细的编辑。谢谢你的回答。我已经应用了它,它实际上会打印到控制台窗口。我还编辑了我的问题,详细说明了我的期望。
let title() = @"<title>This is the title</title>"
printfn "Page title is: %s" (title())
Page title is: <title>This is the title</title>