c# - Set string[] values with a loop -


i'm looking setting values of array in c# way :

        int = 0;         string[] faces = new string[104];          (i = 1; < 104; = i++)         {             faces[i] = i.tostring();         } 

however think code missing something, don't have error visual studio, it's looping without end. help

change this:

i = i++ 

to this:

i++ 

i++ evaluated before increment, you're setting i i.

@jmcilhinney correct want start @ 0, not 1.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -