pha*_*unk 1 c# vb.net conditional-statements
我刚开始使用Vb.Net.我习惯了C#语法.我知道我可以在C#中做到这一点:
if (x | y)
//Test both
if (x || y)
//Test both unless x is true
Run Code Online (Sandbox Code Playgroud)
在Vb.Net中,我怎样才能完成相同的事情,考虑到:
If x or y Then
//Test both no matter what
Run Code Online (Sandbox Code Playgroud)
在Vb.Net中,我怎样才能完成同样的事情?
OrElse
文档在这里:
http://msdn.microsoft.com/en-us/library/ea1sssb2.aspx
VB的当量&&是AndAlso的方式.