Share via


컴파일러 오류 CS0650

업데이트: 2007년 11월

오류 메시지

배열 선언자가 잘못되었습니다. 관리되는 배열을 선언하려면 차수 지정자가 변수 식별자보다 앞에 와야 합니다. 고정 크기 버퍼 필드를 선언하려면 fixed 키워드를 필드 형식보다 앞에 사용하십시오.
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.

배열을 잘못 선언했습니다. 고정 크기 버퍼의 구문은 배열의 구문과 다릅니다.

예제

다음 샘플에서는 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;
    }
}