c# - Is there an easy way to refactor between coding practices to C#4 from C#1,C#2 and C#3 -


i going admit battling changing face of c# , unlearning learnt since starting out c#1.

i started years ago writing greenfield c# 1.1 code , work lot maintenance work on code written previous versions of c#. being exposed old ways of doing things hard battling unlearn code have written in past , have @ daily written in previous versions of c#. having maintain java projects doesn't similar c#1. time unlearn bad practices project deadlines hard do.

my lazy mind against me logic says if use oo , dry principles , code compiles boss happy , thinks when not simplifying code new ways of doing things.

i have started reading jon skeet's c# in depth 2ed gives code solutions specific tasks each of c#1,c#2,c#3,c#4 each time showing code examples how simplifies code finding hard remember , put practice these new methods due having still deal legacy code daily , still having balance jack of trades dev jobs.

  1. is there easy way refactor between coding practices c#1,c#2,c#3 c#4 either on fly or @ compile time , give suggests either in english language or refactor code me.

  2. is there anywhere tool or site can see changes same code between c# versions excluding jon skeet's c# in depth book?

the latest version of resharper helpful tool move c# forward in many respects quickly. point newer practices , make quicker & less painful employ them across existing code.

a couple forward-looking resharper refactorings come mind are:

  • static extension method...
  • property auto property...

also, resharper will, example, encourage use var implicit declarations possible.

coderush can same, have not used recently.

to see difference between such tools' refactorings put , started, diffing against prior revisions of files in source control comes mind.

for changes .net bcl alongside c# @stakx points out, consider digging build warnings regarding deprecated code built against newer versions of .net. once learn (as 1 example) replace uses of system.xml.xmlvalidatingreader system.xml.xmlreader, making change in other places flagged former deprecated type become quick.

what's obsolete in .net framework on msdn characterizes recent bcl deprecations since .net 1.1 , how update affected code.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -