C# Edit and Continue: error 4010
Updating the modifiers of a [type | member | parameter modifier] will prevent the debug session from continuing while Edit and Continue is enabled
This error indicates that you tried to edit the modifiers of a type, member, or parameter modifier, which cannot be changed while debugging. This may include:
Changes to accessibility.
Addition or removal of abstract, virtual, sealed, unsafe, partial, override, new, static for types and members.
Changes to ref, out, and params for parameters.
For example, consider the following code:
internal class Program
{
static void Main(string[] args) {}
}
If you step into Main, then change internal to public, this error occurs.
To correct this error
Choose Undo from the Debug menu to undo the change.
–or–
On the Debug menu, click Stop Debugging, make your changes, then start a new debugging session.