C# Keywords / C# 关键字
以及它们在 VL 里怎么表达。
图例
- not-supported —— 这个关键字在 VL 里没有对应物。如果你确实需要它的功能,仍然可以写 C# 代码给 VL 用,见使用 C# 编写节点。
- no-inheritance —— VL 不支持类继承,因此也没有随之而来的这类概念。
abstract
C# 参考 · {no-inheritance}
as
C# 参考 · 用 CastAs 节点。
base
C# 参考 · {no-inheritance}
break
C# 参考 · 见循环的特殊针脚,那里讲了怎么用 Break 输出跳出循环。
case
catch
checked
C# 参考 · {not-supported}
class
const
C# 参考 · {not-supported}
continue
C# 参考 · {not-supported}
decimal
default
delegate
do
double
C# 参考 · 在 VL 里叫 Float64,属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
else
enum
C# 参考 · 已有的枚举在 VL 里当然能用,但有一件事 VL 还做不到:定义自定义枚举。需要自定义枚举的话,目前得用 C# 代码来定义,做法见使用 C# 编写节点。
event
C# 参考 · VL 不用事件,而是用一个类似的概念:Observable。详见响应式。
explicit
C# 参考 · {not-supported}
extern
C# 参考 · {not-supported}
finally
fixed
C# 参考 · {not-supported}
float
C# 参考 · 在 VL 里叫 Float32,属于 Primitives 目录。
for
foreach
goto
C# 参考 · {not-supported}
if
implicit
C# 参考 · {not-supported}
in
C# 参考 · {not-supported}
int
C# 参考 · 在 VL 里叫 Integer32,属于 Primitives 目录。
interface
internal
is
C# 参考 · {not-supported}
lock
C# 参考 · {not-supported}
long
C# 参考 · 在 VL 里叫 Integer64,属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
namespace
C# 参考 · namespace 这个概念在 VL 里叫目录。
new
C# 参考 · new 关键字表示构造器,也就是创建对象新实例的那个运算。在 VL 里,Class 和 Record 的构造器一律叫 Create。
在 VL 里创建一个 DateTime 实例是这样:
(上游此处引用的图片在其仓库中已缺失)
null
C# 参考 · 属于 Primitive.Object 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
operator
out
override
C# 参考 · {no-inheritance}
params
private
protected
C# 参考 · {no-inheritance}
public
readonly
C# 参考 · {not-supported}
ref
return
sbyte
C# 参考 · 在 VL 里叫 Integer8,属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
sealed
C# 参考 · {not-supported}
short
C# 参考 · 在 VL 里叫 Integer16,属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
sizeof
stackalloc
C# 参考 · {not-supported}
static
C# 参考 · {not-supported}
struct
switch
C# 参考 · VL 目前还没有 switch 语句。绕行办法见条件。
this
throw
try
typeof
uint
C# 参考 · 在 VL 里叫 Integer32 (Unsigned),属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
ulong
C# 参考 · 在 VL 里叫 Integer64 (Unsigned),属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
unchecked
C# 参考 · {not-supported}
unsafe
C# 参考 · {not-supported}
ushort
C# 参考 · 在 VL 里叫 Integer16 (Unsigned),属于 Primitives 目录。
只有在节点浏览器里启用了 Advanced 视角时才会显示。
using
virtual
C# 参考 · {no-inheritance}
void
volatile
C# 参考 · {not-supported}