New Feature In C# 2.0

What Is Edit and Continue

E&C is a new feature that lets C# developers fix certain kinds of bugs in their code in a much more productive fashion. Traditionally, when you spot a bug in your application, you stop your application, change the code, and recompile. However, with E&C, you no longer have to stop your application and recompile.

When you make changes to your code with E&C, the running application is modified in memory. The state of the application is preserved, meaning all the variables retain the same value, all the database connections stay open, and so on. You can continue your application from the same point, but with the application using your new code. This means that you can write code and make changes a great deal faster than before. This feature is also useful when doing test driven development. When a test fails, you can set a breakpoint in the offending code, and step through to determine where the error is happening. Depending on the error, you may be able to fix it on the spot and continue running to see if the test passes.

Above these were from MSDN. This new feature can improve the ability of Compiling and Debugging. It will be becoming more and more considerate. Are you interesting? So you can learn about more knowledge from this article Using the Edit and Continue Feature in C# 2.0 from MSDN.

原文地址:https://www.cnblogs.com/wayfarer/p/54735.html