how to loop through an array of vectors in C#

Posted by Robert on Stack Overflow See other posts from Stack Overflow or by Robert
Published on 2010-05-26T02:23:21Z Indexed on 2010/05/26 2:31 UTC
Read the original article Hit count: 190

Filed under:

Hello everyone,I now have an array of vectors:

static Vector3[] axes = new Vector3[] { Vector3.UnitX, Vector3.UnitY, Vector3.UnitZ };

and I want to loop through it,the code I write is:

for(int i=0;i<axes.Length;i++)
 {

    do sth. about axes[i];

 }

However,it doesnt work and gets into infinite loop,could anyone help? thx.

© Stack Overflow or respective owner

Related posts about c#