Expand Minimize
This topic has not yet been rated - Rate this topic

C# Edit and Continue: error 4066

Updating the 'this' or 'base' call of a constructor will prevent the debug session from continuing while Edit and Continue is enabled

This error occurs when you have a base or this call after the constructor declaration. Consider the following example:

class Program

{

   public Program()

      : this(10)

   {

   }

   public Program(int a) { }

   static void Main()

   {

   }

}

If you step into the application, then try to change this(10) to this(20), error 4066 occurs.

To correct this error

  • On the Edit menu, click Undo to undo the changes

    -or-

    On the Debug menu, click Stop Debugging, then make the changes and start a new debugging session.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.