📅  最后修改于: 2022-03-11 14:59:57.708000             🧑  作者: Mango
// The problem is not that your array is boolean,
// it is that you are trying to assign value to buttonBoolean in foreach loop. It is read-only as every foreach iteration variable is
// You could do this instead:
public bool[] inputBool;
for(int i = 0; i < inputBool.Length; i++) {
inputBool[i] = false;
}