The scenario is that I have say two different types of cases - case 1 and case 2. For case 1 and case 2 each I have a certain startIndex, endIndex and a formula for accessing the elements of a List.

Now for assigning values startIndex and endIndex I am preferring a normal switch case, however I am at loss for the formula for accessing elements. For **case 1** it is say something like **List[ a+i ]** and for **case 2** it is say **List[a + (i-b)]**. 
 One way can be to have a for loop like this 

```
for(int i=0;;i++)
{ 
     if(case is 1)
        then f=a+i 
     else if(case 2)
        then f=a+(i-b) 
}

```

I thought of using delegates. however, as per my knowledge they need to be made global. Actions do not return value. Func can be used but one expression/formula takes only one element (int) and the other takes 3. I need something in lines to this like that anonymous function can be assigned any of above mentioned formulae at runtime from the switch case (as the cases might and will increase in future).

Thank you.