Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 等价于可空值检查_C#_Vb.net_Nullable - Fatal编程技术网

C# 等价于可空值检查

C# 等价于可空值检查,c#,vb.net,nullable,C#,Vb.net,Nullable,在VB.net中,这与什么等效 int? x; int s; s = x ?? 5; if()运算符是vb中的空合并运算符 s = If(x, 5) 在vb.net中,有三种方法可用于可空声明 Dim x? As Integer Dim x As Integer? Dim x As Nullable(Of Integer) Dim s As Integer s = If(x, 5) vb.net也有可为空的类型。喜欢尺寸x为整数?

在VB.net中,这与什么等效

int? x;

int s;

s = x ?? 5;
if()运算符是vb中的空合并运算符

s = If(x, 5)

在vb.net中,有三种方法可用于可空声明

Dim x? As Integer
Dim x As Integer?
Dim x As Nullable(Of Integer)


Dim s As Integer

s = If(x, 5)

vb.net也有可为空的类型。喜欢<代码>尺寸x为整数?