Link to home
Start Free TrialLog in
Avatar of toyboy61
toyboy61

asked on

A better way to do things.. ?

I have the following code snippet:
"      if ((Indeks == 1) || (Indeks == 4) || (Indeks == 7) || (Indeks == 10) || (Indeks == 13) || (Indeks == 16) || (Indeks == 19) || (Indeks == 22) || (Indeks == 25) || (Indeks == 28) || (Indeks == 31) || (Indeks == 34) ) "

Is there another way to express this, i.e. by checking if the value of Indeks contains one of the following values (1,4,7,10,13,16,19,22,25,28,31,34).

Something like
    if (Indeks) is a member of [1,4,7,10,13,16,19,22,25,28,31,34) -> go further..

Anyone ?
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial