Declaring Array, HELP.

Hello! I have a bool array with variable size X, called expand. I will be used on my Custom Editor, for X foldouts.

bool[] expand;
int i = 0;
foreach (string[] x in reference.Answers){
 expand <em>= EditorGUILayout.Foldout(expand_, reference.Lines*);*_</em>

i++;
}
Visual Studio says that expand is not assigned, thus cannot be used. How can I a defalt value for the array?
Have a nice day!

your Array has no size.

this will solve it:

private bool expand = new bool[your size];

and be careful. The Array goes from 0 to the size - 1.