How do you test multiple values for equality in one line? Basically I want to do
if (val1 == val2 == val3 == ... valN)
but in VB.Net.
How do you test multiple values for equality in one line? Basically I want to do
if (val1 == val2 == val3 == ... valN)
but in VB.Net.
If you have a lot of values to test and do this very often, you could write you a helper like this:
This can get cumbersome when testing more than a few values.
There is no way to chain them together like that. You need to break it up into pair'd comparisions linked by AndAlso