Share via


C# Edit and Continue: error 4014 

Error Message

Updating the underlying type of a enum will prevent the debug session from continuing while Edit and Continue is enabled

This error indicates that you tried to edit the underlying type of an enumeration, which cannot be changed while debugging.

Consider the following example:

enum Color: byte

{

   Red

}

class Example

{

   static void Main(string[] args) {}

}

If you step into this code, then try to change byte to int, the error occurs.

To correct this error

  • Choose Undo from the Debug menu to undo the changes.

    –or–

  • From the Debug menu, choose Stop Debugging, make the changes, then start a new debugging session.

See Also

Reference

enum (C# Reference)
Supported Code Changes (C#)
Edit and Continue (Visual C#)

Other Resources

Edit and Continue Errors and Warnings (C#)