Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42466

Syntax question concerning an if statment

$
0
0
Ok say I have a list of numbers that I want to make sure do not equal each other can I do it like this:

If (num1 <> num2 AndAlso num3 AndAlso num4) Then
If (num2 <> num3 AndAlso num4) Then
if (num3 <> num4) Then
boolVariable = true
End If
End If
End If

So far this method work most of the time, but sometimes It fails to catch duplicates.

Viewing all articles
Browse latest Browse all 42466

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>