컴파일러 오류 CS0522

오류 메시지

'constructor' : 구조체는 기본 클래스 생성자를 호출할 수 없습니다.
'constructor' : structs cannot call base class constructors

구조체는 기본 클래스 생성자를 호출할 수 없습니다. 기본 클래스 생성자에 대한 호출을 제거하십시오.

다음 샘플에서는 CS0522 오류가 발생하는 경우를 보여 줍니다.

// CS0522.cs
public class clx
{
   public clx(int i)
   {
   }

   public static void Main()
   {
   }
}

public struct cly
{
   public cly(int i):base(0)   // CS0522
   // try the following line instead
   // public cly(int i)
   {
   }
}