Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on 

Converting Van. Net to C#

What does it takes to convert vb.net to c#? Is it worth the effort  . What benefits or worse situation expected?
Visual Basic.NETC#

Avatar of undefined
Last Comment
zachvaldez
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Hi Zach,

In terms of language flexibility, I think people from VB6 background prefer VB.Net and people who are more comfortable with C/C++ family prefer C#.

Over the period of years, Microsoft has brought VB.Net performance to the level of C# so I do not think that slight performance advantage should not matter (ideally).

Benefits are highly controversial when it comes to VB.net and C#. I would like to discuss the differences.

1. VB.Net has historically been treated as a second class citizen - Most of the advancement happen in C# and then they are ported to VB.Net
2. Many a times, ISVs and their add-ons - examples/sample codes are based on C# and sometimes it is really hard to get them in VB.Net.
https://docs.microsoft.com is a really good attempt at having both VB.Net and C# code samples but I still do see some gaps.
3. If you use InterOps, many codes on PInvoke.net are only available as C# code
4. In general, it is easy to get experts on C#.
5. If you are new to C#, you will have some learning curve and you might feel frustrated as things will move slowly - I jumped from VB6 to C# in 2 to 3 days - I know that pain.
6. Some of the language features which you write in VB.Net will look really really hard in C# (but the same thing applies to C# guys when they look at VB.Net code)

As long as the conversion is concerned, please give this one a try:
https://www.tangiblesoftwaresolutions.com/product_details/vb-to-csharp-converter.html

This one is a major disappointment, if you ask me: http://converter.telerik.com/, I suggest you should just blacklist them for any serious conversion.

And of course, my current favorite: https://dotnetfiddle.net/

Regards,
Chinmay.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

I am a bit confused by Chinmay's comment. Are you trying to convert from VB6 or VB.Net?

Converting some code from VB.Net to C# can be done using tools like http://converter.telerik.com/ but none are perfect.

Maybe the greatest benefits of C# (over VB.Net) is that almost everything you find in books/magazines/websites/... are C#. It is usually easier to find C# developers (at least in my North America market).
Avatar of zachvaldez
zachvaldez
Flag of United States of America image

ASKER

If you have a large vb project, what does it need to bring it to the c# world granting that budget is not an issue?

What strategy or plan to do it? Where to start?
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of kaufmed
kaufmed
Flag of United States of America image

What does it takes to convert vb.net to c#? Is it worth the effort?
Well, what problem are you hoping to solve by converting? That may have an impact on your decision to migrate.
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

I hope you realise just how .net works.  Someone codes in a .net language, that is then precompiled to an intermediate code, the intermediate code is then converted on the end user machine.
That means that code in vb.net converted to c# will precompile to identical intermediate code.  Which means zero difference in performance.

The difference for you is how good you (or your colleagues) are in vb.net and c# in terms of maintaining and writing new code.

Also bear in mind you can compile vb.net code into a dll which will run seamlessly with other code written in c# which uses that dll and the code it contains.
Avatar of DevAdmin
DevAdmin
Flag of Italy image

How other write why you want convert a VB.NET project in C#?
What is the reason why you do not want to keep it in VB.NET?
Avatar of zachvaldez
zachvaldez
Flag of United States of America image

ASKER

Great
C#
C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

98K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo