Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error CS0650 

Error Message

Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type.

An array was declared incorrectly. Be aware that the syntax for a fixed size buffer is different from that of an array.


The following sample generates CS0650.

// CS0650.cs
public class MyClass
   public static void Main()
      int myarray[2];   // CS0650
      // OK
      int[] myarray2 = new int[2] {1,2};
      myarray2[0] = 0;

Community Additions

© 2015 Microsoft