Share via


컴파일러 오류 CS0552

업데이트: 2007년 11월

오류 메시지

'conversion routine' : 인터페이스로/부터 사용자 정의 변환
'conversion routine' : user defined conversion to/from interface

인터페이스로 또는 인터페이스로부터 사용자 정의 변환을 만들 수 없습니다. 변환 루틴이 필요하면 인터페이스를 클래스로 만들어서 이 오류를 해결하거나 인터페이스에서 클래스를 파생하십시오.

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

// CS0552.cs
public interface ii
{
}

public class a
{
   // delete the routine to resolve CS0552
   public static implicit operator ii(a aa) // CS0552
   {
      return new ii();
   }

   public static void Main()
   {
   }
}