Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1602

Visual Studio .NET 2003

'symbol' is already defined in this assembly

A module contains a symbol for a type, and that module is included in the compilation of an assembly that also defines the same symbol. Change the name of one of the symbols.

The following sequence generates C1602. First, create a module:

// CS1602.cs
// compile with: /target:module
namespace Test
{
   public class B
   {
   }
}

Then, create an assembly and add the module:

// CS1602a.cs
// compile with: /addmodule:CS1602.netmodule

namespace Test
{
   public class B   // CS1602
   // try the following line instead
   // public class C
   {
   }

   public class Client
   {
      static public void Main()
      {
      }
   }
}
Show:
© 2014 Microsoft