在 F# 中使用关键字作为成员名称

cit*_*kid 3 f#

F# 是否允许使用关键字名称定义成员?

type Fruit =
  val type : string
Run Code Online (Sandbox Code Playgroud)

在 C# 中,可以使用@:

class Fruit 
{
    string @type;
}
Run Code Online (Sandbox Code Playgroud)

vcs*_*nes 5

使用双反引号:

type Fruit =
    val ``type`` : string
Run Code Online (Sandbox Code Playgroud)