Compiler Error CS0759

No defining declaration found for implementing declaration of partial method 'method'.

A partial method must have a defining declaration that defines the signature (name, return type and parameters) of the method. The implementation or method body is optional.

To correct this error

  1. Provide a defining declaration for the partial method in the other part of a partial class or struct.

Example

The following example generates CS0759:

// cs0759.cs
using System;

public partial class C
{
    partial void Part() // CS0759
    {
    }

    public static int Main()
    {
        return 1;
    }
}

To correct this error a defining declaration for Part() method should be provided:

using System;

public partial class C
{
    partial void Part();    // Defining declaration
}

public partial class C
{
    partial void Part()     // Implementing declaration, no CS0759
    {
    }

    public static int Main()
    {
        return 1;
    }
}

See also