gpt4 book ai didi

.net - F# 中有 C# 的 @ 关键字吗?

转载 作者:行者123 更新时间:2023-12-01 09:06:11 25 4
gpt4 key购买 nike

Possible Duplicate:
Using keywords as identifiers in F#

C# 允许您在变量前加上 @ 关键字:

Keywords are predefined reserved identifiers that have special meanings to the compiler. They cannot be used as identifiers in your program unless they include @ as a prefix. For example, @if is a legal identifier but if is not because it is a keyword.

我想知道 F# 中是否有类似的构造。如果我没记错的话,甚至 VB.NET 也提供了类似的构造。

最佳答案

使用引号:

let rec ``let rec`` () = ``let rec`` ()

关于.net - F# 中有 C# 的 @ 关键字吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7183621/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com