Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0759
Collapse the table of content
Expand the table of content

Compiler Error CS0759

Visual Studio 2008

Updated: August 2009

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.

The following example generates CS0759:

using System;

namespace CS0759
{
    public partial class PartialClass
    {
        // The following method defines the implementation of the partial method.
        // Compiler error CS0759 results when the implementation declaration is 
        // present but the signature definition is not.
        partial void Part() 
        {
            Console.WriteLine("Method implementation");
        }

        public static void Main()
        {
            PartialClass pc = new PartialClass();
            pc.Part();
        }
    }

    //// Uncomment the following class to resolve the error.
    //public partial class PartialClass
    //{
    //    // The following method defines the signature of the partial method.
    //    partial void Part();
    //}
}

Date

History

Reason

August 2009

Expanded the example.

Customer feedback.

Community Additions

ADD
Show:
© 2015 Microsoft