0
什么是VB.NET相当于此代码什么是vb.net相当于c#匿名代码块?
void foo()
{
...
{ //anonymous code block starts here
...
} //anonymous code block ends here
}
什么是VB.NET相当于此代码什么是vb.net相当于c#匿名代码块?
void foo()
{
...
{ //anonymous code block starts here
...
} //anonymous code block ends here
}
没有在VB.NET等同匿名代码块。
您可以用模拟如果属实:
If True Then
End If
或者,如果你不需要一个块的范围,你可以使用区域:
#Region "This is the code to be collapsed"
#End Region
你可以得到最接近的是:
If True Then ' anonymous code block starts here
' ...
End If ' anonymous code block ends here