How can I convert a large application to C#?

We have just upgraded a vb6 application to VB.Net winforms. Now we want to convert it to C# winforms and re-use the objects or whatever we can re-use in there and finally rebuild it to mvc.

Is there a tool I can use (open source or free) to convert to C#? Are there any pitfalls I might encounter during the conversion, like code that cannot be converted to C#?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
Why do that?
VB.Net and C# both compile to the same intermediate code.
Éric MoreauSenior .Net ConsultantCommented:
converting Windows Forms to ASP.Net MVC! They are very different beast you know? If your project was correctly architectured, you should be able to reuse the business logic part and the data layer part which should be in DLLs.
As Andy has pointed out, they do compile to the same intermediate code.  And as Eric pointed out, ASP.NET and WinForms are completely different animals (MVC is not an ASP.NET only architectural pattern).  That being said, yes there are converters that you can use.  Some are free while others cost.  The free ones dont have a problem per se with the conversion one to the other (although the most common issues I see with converters deal with event handlers and array index references).

The best one, however, is not mean to be a converter.  Reflector, since it deals with IL, can reconstruct any .NET assembly into any .NET language you want (although, you can get code artifacts where the code has been obfuscated or otherwise optimized).

Also be warned that the reconstructed code is not refactored, in places you will find that it was been expanded or rendered explicitly; e.g. -

AutoImplemented properties are reconstructed with backing fields.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.