Array question?

This is a basic question, but how do you reference multiple elements of an array? Is it possible to, after you reference one element, to reference the rest of them? How about referencing a specific number range?

Can I do something like this:

if(condition==true){array[0].active=true;array[1 through 7].active=false;}

You could try using `foreach`, and that will let you reference every single element in an array and do something to them.

I apologize as my work computer isn't connected to the internet, so someone else might provide more correct code later, but I believe it's something along the lines of (don't copy and paste it, I'm almost 100% sure my syntax is wrong :)):

foreach (int number in myArray)
 number = 0;

int you replace with whatever the data type is in your array. Int, float, etc.

"number" you replace with whatever name you want to use to refer to each element as you do things to it.

myArray is where the array goes that you're pulling this info from.

In the above example, we run through every element in myArray and change all elements to equal 0.