samedi 23 décembre 2017

Striving to write efficient code

i am writing code for large scale app, and there is an event where lots if else check is required for eg.

if(i==1){//some logic}
else if if(i==2){//some logic}
.
.
else if(i==1000){//some logic}

is there any efficient way or more organized way to write this ?

Aucun commentaire:

Enregistrer un commentaire