This documentation is archived and is not being maintained.

Compiler Error CS0537

Visual Studio .NET 2003

The class System.Object cannot have a base class or implement an interface.

It is recommended not to declare a user-defined class called Object in a user-defined namespace called System.

The following sample generates CS0537. To resolve this error, remove the base class defined on your declaration of System.Object (MarshalByRefObject).

// CS0537.cs
using System;
namespace System 
{
   // To resolve the error, remove the base class MarshalByRefObject.
   public class Object : MarshalByRefObject // CS0537
   {
      static void Main()
      {
      }
   }
}
Show: