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
- 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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for