Share via


컴파일러 오류 CS0596

업데이트: 2007년 11월

오류 메시지

Guid 특성은 ComImport 특성과 함께 지정되어야 합니다.
The Guid attribute must be specified with the ComImport attribute

ComImport 특성을 사용할 때에는 Guid 특성이 있어야 합니다.

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

// CS0596.cs
using System.Runtime.InteropServices;

namespace x
{
   [ComImport]   // CS0596
   // try the following line to resolve this CS0596
   // [ComImport, Guid("00000000-0000-0000-0000-000000000001")]
   public class a
   {
   }

   public class b
   {
      public static void Main()
      {
      }
   }
}