Export (0) Print
Expand All
Expand Minimize
2 out of 16 rated this helpful - Rate this topic

Compiler Warning (level 2) CS0436 

Error Message

The type 'type' in 'file_2' conflicts with the imported type 'type'. Using the one in 'file_2'

This warning is issued when a type in a source file (file_2) conflicts with an imported type in file _1. The compiler uses the one in the source file.


// CS0436_a.cs
// compile with: /target:library
public class A {
   public void Test() {

The following example generates CS0436.

// CS0436_b.cs
// compile with: /reference:CS0436_a.dll
// CS0436 expected
public class A { 
   public void Test() {

public class Test 
   public static void Main() 
      A x = new A();
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.