Share via


컴파일러 오류 CS0722

업데이트: 2007년 11월

오류 메시지

'type': 정적 형식은 반환 형식으로 사용할 수 없습니다.
'type': static types cannot be used as return types

정적 형식은 인스턴스를 만들 수 없기 때문에 반환 형식으로서 의미가 없습니다.

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

// CS0722.cs
public static class SC
{
}


public class CMain
{
   public SC F()  // CS0722
   {
      return null;
   }

   public static void Main()
   {
   }
}