• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

is IF ...........OR ............. THEN valid

In VB is ther following IF statement valid?

If row(1).ToString() <> "int" Or row(1).ToString() <> "tinyint" Or row(1).ToString() <> "bit" Then
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it is valid, but I would rather presume you want to put AND instead of OR...
otherwise, it will alway return TRUE.
Paul JacksonSoftware EngineerCommented:
Using ANDALSO is considered better practice as it will not evaluate all the condition once it matches with one, thereby improving performance.
So if the 1st condition is met, the other 2 conditions are not evaluated
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now