Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0501

'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
}

Community Additions

ADD
Show:
© 2014 Microsoft