Share via


컴파일러 경고(수준 2) CS0436

업데이트: 2007년 11월

오류 메시지

'assembly'의 'type' 형식이 'assembly'의 가져온 형식 'type2'과(와) 충돌합니다. 'assembly'에 정의된 형식을 사용합니다.
The type 'type' in 'assembly' conflicts with the imported type 'type2' in 'assembly'. Using the type defined in 'assembly'.

이 경고는 소스 파일(file_2)에 있는 형식이 file_1에서 가져온 형식과 충돌할 때 발생합니다. 이 경우 컴파일러에서는 소스 파일의 형식을 사용합니다.

예제

// CS0436_a.cs
// compile with: /target:library
public class A {
   public void Test() {
      System.Console.WriteLine("CS0436_a");
   }
}

다음 예제에서는 CS0436 경고가 발생하는 경우를 보여 줍니다.

// CS0436_b.cs
// compile with: /reference:CS0436_a.dll
// CS0436 expected
public class A { 
   public void Test() {
      System.Console.WriteLine("CS0436_b");
   }
}

public class Test 
{
   public static void Main() 
   {
      A x = new A();
      x.Test();
   }
}