Compiler Warning (level 2) CS0436

https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0436

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


The following example generates 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();  
   }  
}  
posted @ 2017-11-09 15:19  ChuckLu  阅读(705)  评论(0编辑  收藏  举报