This documentation is archived and is not being maintained.

Compiler Error CS0010

Visual Studio .NET 2003

Cannot declare a namespace and a type both named 'name'

A user-defined namespace is conflicting with an imported type name.

For example, the following sample generates CS0010:

// CS0010.cs
namespace System.Byte   // CS0010, rename namespace
{
   class MyClass
   {
      public static int Main()
      {
         return(0);
      }
   }
}
Show: