This documentation is archived and is not being maintained.

Compiler Error CS0501

Visual Studio 2008

'member function' must declare a body because it is not marked abstract, extern, or partial

Nonabstract methods must have implementations.

The following sample generates CS0501:

// CS0501.cs
// compile with: /target:library
public class clx
   public void f();   // CS0501 declared but not defined
   public void g() {}   // OK