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

  • Home
  • SEARCH
  • 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 72245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:00:52+00:00 2026-05-10T20:00:52+00:00

When working with my .Net 2.0 code base ReSharper continually recommends applying the latest

  • 0

When working with my .Net 2.0 code base ReSharper continually recommends applying the latest c# 3.0 language features, most notably; convert simple properties into auto-implement properties or declaring local variables as var. Amongst others.

When a new language feature arrives do you go back and religiously apply it across your existing code base or do you leave the code as originally written accepting that if new code is written using new language features there will be inconsistencies across your 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. 2026-05-10T20:00:52+00:00Added an answer on May 10, 2026 at 8:00 pm

    If it ain’t broke, don’t fix it. Of course, if you have confidence in your unit tests, you can give it a whirl, but you shouldn’t really go randomly changing code ‘just because’.

    Of course – in some cases, simplifying code is a valid reason to make a change – but even something as innocent as switching to an auto-implemented property could break code that makes assumptions and uses reflection to update the fields directly. Or it could break serialization.

    Changing to ‘var’ can actually give you a different (more specific) type, which might cause a different method overload to get selected, etc.

    So again; it comes down to your confidence in the unit tests.

    Other considerations:

    • does the rest of the team understand the new syntax yet?
    • does your project need to support C# 2.0 (for example, some open source projects might want to retain compatibility with C# 2.0).

    If neither of these are an issue, you should be OK to use the new features in new code… just be a little cautious before hitting ‘update all’ on old code…

    Here’s a trivial example of ‘var’ as a breaking change:

        static void Main() {         using (TextReader reader = File.OpenText('foo.bar')) { // [HERE]             Write(reader);         }     }     static void Write(TextReader reader) {         Console.Write(reader.ReadToEnd());     }     static void Write(StreamReader reader) {         throw new NotImplementedException();     } 

    Now switch to var reader on the line marked [HERE]…

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

Sidebar

Ask A Question

Stats

  • Questions 203k
  • Answers 203k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This code will get you started: 'Toy Stroy..(II) (1995)'.rstrip(')').rsplit('(',1) Other… May 12, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer Bill, the function Setlength does not exist in Delphi-Prism (you… May 12, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer var parts = s.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries); foreach (string… May 12, 2026 at 8:35 pm

Related Questions

I have created a custom labeller for CC.Net which is working almost perfectly, however
Why are circular references in Visual Studio a bad practice? First, I will describe
I miss the .Net remoting days when I could just send an object over
I'm having a dead-end situation with one of the clients using my software. Out

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.