本文介绍了支持布尔运算符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

支持布尔运算符?

我需要评估以下表达式:

A> B和B> C



谢谢

Tomaso

The Boolean operators are supported?
I need evaluate the following expression:
A>B and B>C

Thanks
Tomaso

推荐答案

If A > B And B > C Then
    ' Both parts of the condition evaluated - probably not what you want.
End If


If A > B AndAlso B > c Then
    ' B > C only evaluated if A > B, short circuit - probably what you want.
End If





AndAlso 相当于&&& / code>在c#,相当于& ,如果这样可以使评论更清晰。



The AndAlso is equivalent to && in c#, And is equivalent to & if that makes the comments clearer.



这篇关于支持布尔运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 06:58