Export (0) Print
Expand All
Expand Minimize
0 out of 3 rated this helpful - Rate this topic

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.