标签: c# vb.net nullable
VB.net中的等价物是什么
int? x; int s; s = x ?? 5;
答案 0 :(得分:2)
if()运算符是vb。
s = If(x, 5)
答案 1 :(得分:2)
vb.net中有三种方式可以为可空的声明
Dim x? As Integer Dim x As Integer? Dim x As Nullable(Of Integer) Dim s As Integer s = If(x, 5)