A potentially simple question here, I get an error: Cannot apply indexing with [] to an expression of type 'System.Array'
public Array hello()
{
var damn = new[] { a2,a3,a4,a5,a6,a7,a8,a9};
return damn;
}
private void a1disable()
{
var a = new[] { a1, a2, a3, a4, a5, a6, a7, a8, a9 };
var b = hello();
a[1].Enabled = false;
b[1].Enabled = false;
}
a[1].Enabled = false;works absolutely fine! it's just b[1].Enabled = false;that it throws the error described above, I haven't used many arrays before, so I'm sorry if the answer seems obvious, I'm just looking for clarification as to why this is happening. Thanks in advance if you can help :)
source
share