Hello.
I have to execute some operations according to some (4) booleans.
Let's suppose the normal estate of the booleans is False, and that only one of the four booleans can be True at one time (which is not necesarily true, but the program cannot go ahead with two True values).
Should I use nested Select Case or nested If-Else-If? I feel a bit clumsy with the nested Select Case but I suppose it should be sth similar to this:
Thank you for your suggestions.
In the case I had two True and had to Exit I suppose I could code sth similar to the following:
I have to execute some operations according to some (4) booleans.
Let's suppose the normal estate of the booleans is False, and that only one of the four booleans can be True at one time (which is not necesarily true, but the program cannot go ahead with two True values).
Should I use nested Select Case or nested If-Else-If? I feel a bit clumsy with the nested Select Case but I suppose it should be sth similar to this:
VB.NET:
Select Case Boolean1
Case True
Case Else
Select Case Boolean2
Case True
Case Else
Select Case Boolean3
Case True
Case Else
Select Case Boolean4
Case True
Case Else
End Select
End Select
End Select
End Select
Thank you for your suggestions.
In the case I had two True and had to Exit I suppose I could code sth similar to the following:
VB.NET:
[COLOR=#0000ff]If[/COLOR] Boolean1 [COLOR=#0000ff]and[/COLOR] Boolean2 [COLOR=#0000ff]or[/COLOR] Boolean1 [COLOR=#0000ff]and[/COLOR] Boolean3 [COLOR=#0000ff]or[/COLOR] Boolean1 [COLOR=#0000ff]and[/COLOR] Boolean4 [COLOR=#0000ff]or[/COLOR] Boolean2 [COLOR=#0000ff]and[/COLOR] Boolean3 [COLOR=#0000ff]or[/COLOR] Boolean2 [COLOR=#0000ff]and[/COLOR] Boolean4 [COLOR=#0000ff]or[/COLOR] Boolean3 [COLOR=#0000ff]and[/COLOR] Boolean4 [COLOR=#0000ff]Then[/COLOR] [COLOR=#40e0d0]Application[/COLOR].Exit()