Compiler Error CS0756

A partial method may not have multiple defining declarations.

The defining declaration of a partial method is the part that specifies the method signature, but not the implementation (method body). A partial method must have exactly one defining declaration for each unique signature. Each overloaded version of a partial method must have its own defining declaration.

Example

The following sample generates CS0756:

// CS0756.cs (5,18)

public partial class PartialClass
{
    partial void PartialMethod();
    partial void PartialMethod();
}

To correct this error

Remove all except one defining declaration for the partial method:

public partial class PartialClass
{
    partial void PartialMethod();
}

See also