Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0500 

Error Message

'class member' cannot declare a body because it is marked abstract

An abstract method cannot contain its implementation.

The following sample generates CS0500:

// CS0500.cs
namespace x
{
   abstract public class clx
   {
      abstract public void f(){}   // CS0500
      // try the following line instead
      // abstract public void f();
   }

   public class cly
   {
      public static int Main()
      {
         return 0;
      }
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft