Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3211682
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:45:34+00:00 2026-05-17T14:45:34+00:00

I develop and maintain a large (500k+ LOC) WinForms app written in C# 2.0.

  • 0

I develop and maintain a large (500k+ LOC) WinForms app written in C# 2.0. It’s multi-user and is currently deployed on about 15 machines. The development of the system is ongoing (can be thought of as a perpetual beta), and there’s very little done to shield users from potential new bugs that might be introduced in a weekly build.

For this reason, among others, i’ve found myself becoming very reliant on edit-and-continue in the debugger. It helps not only with bug-hunting and bug-fixing, but in some cases with ongoing development as well. I find it extremely valuable to be able to execute newly-written code from within the context of a running application – there’s no need to recompile and add a specific entry point to the new code (having to add dummy menu options, buttons, etc to the app and remembering to remove them before the next production build) – everything can be tried and tested in real-time without stopping the process.

I hold edit-and-continue in such high regard that I actively write code to be fully-compatible with it. For example, I avoid:

  • Anonymous methods and inline delegates (unless completely impossible to rewrite)
  • Generic methods (except in stable, unchanging utility code)
  • Targeting projects at ‘Any CPU’ (i.e. never executing in 64-bit)
  • Initializing fields at the point of declaration (initialisation is moved to the constructor)
  • Writing enumerator blocks that use yield (except in utility code)

Now, i’m fully aware that the new language features in C# 3 and 4 are largely incompatible with edit-and-continue (lambda expressions, LINQ, etc). This is one of the reasons why i’ve resisted moving the project up to a newer version of the Framework.

My question is whether it is good practice to avoid using these more advanced constructs in favor of code that is very, very easy to debug? Is there legitimacy in this sort of development, or is it wasteful? Also, importantly, do any of these constructs (lambda expressions, anonymous methods, etc) incur performance/memory overheads that well-written, edit-and-continue-compatible code could avoid? …or do the inner workings of the C# compiler make such advanced constructs run faster than manually-written, ‘expanded’ code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:45:34+00:00Added an answer on May 17, 2026 at 2:45 pm

    Without wanting to sound trite – it is good practice to write unit/integration tests rather than rely on Edit-Continue.

    That way, you expend the effort once, and every other time is ‘free’…

    Now I’m not suggesting you retrospectively write units for all your code; rather, each time you have to fix a bug, start by writing a test (or more commonly multiple tests) that proves the fix.

    As @Dave Swersky mentions in the comments, Mchael Feathers’ book, Working Effectively with Legacy Code is a good resource (It’s legacy 5 minutes after you wrote it, right?)

    So Yes, I think it’s a mistake to avoid new C# contructs in favor of allowing for edit and continue; BUT I also think it’s a mistake to embrace new constructs just for the sake of it, and especially if they lead to harder to understand code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop and maintain small intranet web apps written in JSP and Java. They
I develop exclusively on VMs. I currently run Boot Camp on a MacBook Pro
I develop an extension module for Guile, written in C. This extension module embeds
I develop and manage about 45 WindowsCE5 devices. Updating applications on the devices is
I develop / maintain an application that takes a long time to build (as
develop one app speech to text conversion on mobile phones.i want to develop it
We develop custom survey web sites and I am looking for a way to
We develop Win32 application that access to SQL 2005 database through Linq to SQL.
I develop a number of desktop Java applications using Swing, and while Swing is
I develop applications for the PocketPC platform (.NET Compact Framework 2.0 and higher), and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.