Click here to Skip to main content
15,895,709 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: What C# tools do you recommend? Pin
Robert Chafer10-Nov-17 0:25
Robert Chafer10-Nov-17 0:25 
AnswerRe: What C# tools do you recommend? Pin
clemenslinders10-Nov-17 2:26
clemenslinders10-Nov-17 2:26 
AnswerRe: What C# tools do you recommend? Pin
ClockMeister10-Nov-17 4:21
professionalClockMeister10-Nov-17 4:21 
AnswerRe: What C# tools do you recommend? Pin
Thornik10-Nov-17 9:02
Thornik10-Nov-17 9:02 
GeneralRe: What C# tools do you recommend? Pin
Slow Eddie10-Nov-17 9:36
professionalSlow Eddie10-Nov-17 9:36 
GeneralRe: What C# tools do you recommend? Pin
Thornik10-Nov-17 11:52
Thornik10-Nov-17 11:52 
AnswerRe: What C# tools do you recommend? Pin
MAIsw12-Nov-17 21:20
MAIsw12-Nov-17 21:20 
AnswerRe: What C# tools do you recommend? Pin
ElHori14-Nov-17 22:56
ElHori14-Nov-17 22:56 
I'm currently in the last phase of converting a ~250.000 line project from VBA (!) to C# and I agree that re-writing it as a functional clone would have been the better way.

But here is how I did it:

1. VBA -> VB6 (not your issue but included for completeness' sake)
- acquire and run an old VB6-IDE
- import/convert VBA-project
- fix compile-errors

2. VB6 -> VB.NET
- acquire and run an old version of VisualStudio (those still had a converter for legacy-VB6! I think I used 2005)
- import/convert VB6-project
- fix compile-errors
-> now we're in .NET-wonderland!

3. VB.NET -> C#
- run an old version of "SharpDevelop" (I used v4.4 - as far as I know the feature in question was removed in v5!)
- open/import VisualStudios VB.NET-project
- convert to C#
- open/import in VisualStudio
- fix compile-errors

-> now the code-base is where it's supposed to be - in C# and in VisualStudio!


During these conversion-steps I often treated the codeFiles not only within the respective IDE but also as "normal" text-files in <insert-text-editor-of-choice>.
For that phase I recommend
- EditPad (for the actual search-and-replace-stuff)
- Agent Ransack (for identifying the codeFiles in need tampering)
- and a good and healthy dose of regEx!

When arrived in VisualStudio I recommend
- StyleCop
- ReSharper
They both are very good at spotting code-habits that stem from VBA/6 and were simply converted!


Fixing the (comparatively few) comile-errors introduced in each conversion-step didn't take too much time / effort.
- the vast majority of those were of the same few types and quite simple to fix. Again: freshing-up on regEx is highly recommended Smile | :)
- Most time went into replacing some filthy VBA/6-only stuff that doesn't have an 1:1 equivalent in C# (for good reasons). But this kind of code needed re-writing either way.


But:
While the outlined approach worked very well and took surprisingly little time, the actual work is then only starting Frown | :-(
- yes, VBA/6 and C# do stuff in different ways
- and they especially lack a lot of C#s capabilities so the resulting code - while working - is almost always very clunky, verbose and un-elegant

I repeat:
looking back, re-writing the code as functional clone would have been the better way!

Perhaps there is a middle way: convert the old code to have some kind of quarry for quickly looking up / copying old algorithms where necessary (without having to do the same steps of syntax-conversion over and over again)...?
GeneralFakir news, even if it's true Pin
W Balboos, GHB9-Nov-17 2:18
W Balboos, GHB9-Nov-17 2:18 
GeneralRe: Fakir news, even if it's true Pin
CodeWraith9-Nov-17 2:27
CodeWraith9-Nov-17 2:27 
GeneralRe: Fakir news, even if it's true Pin
W Balboos, GHB9-Nov-17 2:28
W Balboos, GHB9-Nov-17 2:28 
GeneralRe: Fakir news, even if it's true Pin
CodeWraith9-Nov-17 2:32
CodeWraith9-Nov-17 2:32 
GeneralRe: Fakir news, even if it's true Pin
User 48350479-Nov-17 2:55
User 48350479-Nov-17 2:55 
GeneralRe: Fakir news, even if it's true Pin
BillWoodruff9-Nov-17 6:43
professionalBillWoodruff9-Nov-17 6:43 
GeneralRe: Fakir news, even if it's true Pin
W Balboos, GHB9-Nov-17 7:10
W Balboos, GHB9-Nov-17 7:10 
GeneralNot very busy in here today Pin
Keith Barrow9-Nov-17 2:07
professionalKeith Barrow9-Nov-17 2:07 
GeneralRe: Not very busy in here today Pin
W Balboos, GHB9-Nov-17 2:13
W Balboos, GHB9-Nov-17 2:13 
GeneralRe: Not very busy in here today Pin
CodeWraith9-Nov-17 2:23
CodeWraith9-Nov-17 2:23 
GeneralRe: Not very busy in here today Pin
jeron19-Nov-17 4:03
jeron19-Nov-17 4:03 
GeneralRe: Not very busy in here today Pin
Mike Hankey9-Nov-17 4:29
mveMike Hankey9-Nov-17 4:29 
GeneralWhat a business mind! Pin
Tomz_KV9-Nov-17 1:54
Tomz_KV9-Nov-17 1:54 
JokeRe: What a business mind! Pin
Tim Carmichael9-Nov-17 2:01
Tim Carmichael9-Nov-17 2:01 
GeneralRe: What a business mind! Pin
Tomz_KV9-Nov-17 2:04
Tomz_KV9-Nov-17 2:04 
GeneralRe: What a business mind! Pin
Bassam Abdul-Baki9-Nov-17 4:58
professionalBassam Abdul-Baki9-Nov-17 4:58 
GeneralRe: What a business mind! Pin
CodeZombie6210-Nov-17 0:36
CodeZombie6210-Nov-17 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.