Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Wrong number of indices inside [], expected 'number'
An array-access operation specified the incorrect number of dimensions within the square brackets. For more information, see Arrays (C# Programming Guide).
Example
The following sample generates CS0022:
// CS0022.cs
public class MyClass
{
public static void Main()
{
int[] a = new int[10];
a[0] = 0; // single-dimension array
a[0,1] = 9; // CS0022, the array does not have two dimensions
}
}