相关疑难解决方法(0)

在F#中使用关键字作为标识符

在C#中,我可以执行以下操作:

int @private = 15;
Run Code Online (Sandbox Code Playgroud)

在VB.NET中,我可以执行以下操作:

Dim [Private] As Integer = 15
Run Code Online (Sandbox Code Playgroud)

我想知道在F#中是否有一种方法可以使用保留关键字作为标识符,就像在VB.NET和C#中一样?

f# identifier keyword

27
推荐指数
1
解决办法
2800
查看次数

F#:实现具有与关键字begin相同的函数名的接口

我正在尝试实现IVector接口,它是Microsoft.VisualC.StlClr命名空间的一部分.它有一个成员函数begin().如果我尝试实现该接口,那么它会抱怨"对象表达式中的意外关键字'begin'".

这是因为begin是一个关键字而我无法使用该名称实现成员函数?

B.

f# identifier keyword

5
推荐指数
1
解决办法
489
查看次数

标签 统计

f# ×2

identifier ×2

keyword ×2