This documentation is archived and is not being maintained.

Compiler Error CS0650

Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier

An array was declared incorrectly.

The following sample generates CS0650:

// CS0650.cs
public class MyClass
   public static void Main()
      int myarray[2];   // CS0650
      // try the following lines instead
      // int[] myarray = new int[2] {1,2};
      // myarray[0] = 0;