c# - foreach inversly -


is there posible way make foreach iterate through collection end begining?

int[] fibarray = new int[] { 0, 1, 2, 3, 5, 8, 13 };     foreach (int in fibarray)     {         system.console.writeline(i);     } 

how display inversly foreach ?

using system.linq;  foreach (int in fibarray.reverse()) 

but normal loop more efficient:

for( int index = fibarray.length - 1; index >= 0; --index ) {     int = fibarray[index];     ... } 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -