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