Creating an Array of named Booleans C#

Post » Sat May 26, 2012 4:58 am

How do you create an array of named booleans? I know how to declare an array of bools but I would like to name the parts of the array as well so I can keep track of them. I think it would look something like this.
public bool[] MyNamedBooleans = new bool[]{cat = false, bat = true};
but when I go to save it I get an error saying cat and bat do not exist in their current context. What am I doing wrong?
User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm

Return to Othor Games