VB to .Net migration

G

Guest

Hi,
We are planning to migrate one VB project to .Net. But I have a common
questions. can any one clarify my below questions.


1. Is there is any advantage of using C# than VB.net. I feel both are same
in terms of performance, security and etc., Is it correct?

2. I feel that converting from VB to VB.net is much more easier than VB to
C#. Is it correct?

3. Is there is any free tools available in any site which i can use to
convert it from VB to .Net (ofcourse i will do manual code fix as well).


Thanks in advance
 
D

David R. Longnecker

Note: Opinions :)

1. Technically, not that I'm aware of; they're both equal, it's what you're
most comfortable with. (http://www.google.com/search?hl=en&lr=&q=advantages+to+c#)
can provide some insight, though most of the top references are a few years
old. The advantage to .NET is that if you have a development team and one
is verse in VB and another in C#, they can still work together without too
much trouble--though standardization is important in an enterprise.

2. Probably, the syntax is somewhat the same from 6.0 to .NET whereas C#'s
formatting and syntax (and some commands) are different.

3. Google is your friend. http://www.google.com/search?hl=en&q=convert+vb+to+c#
turns up 3,650,000 results today and a few are free online and client-based
tools for the conversion. Something to consider, import your project into
Visual Studio and add the Microsoft.VisualBasic namespace and then rebuild
from there, finding each part that still calls that namespace, but without
breaking the application (maybe).

You can find information on the namespace at http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.aspx.

Hope this helps. :)
 
S

sloan

Mine are Opinions also:

1. see http://www.codeproject.com/dotnet/CSharpVersusVB.asp

2. The issue with this is that you bring bad habits with you.
Making a clean break to something that doesn't allow bad habits would pay
off more down the road.

3. You really don't want to do this. adodb recordset is no longer the
datatool, but converters will bring it forward.
DataSet, Strongly Typed DataSets, and IDataReaders are the "new" way.

..................................

I've programmed in VB since VB4/16bit, VB5, VB6. I programmed in VB.NET for
2 or more years.
I"ve programmed in C# for over 3 years.

Yes, I made a living for over 6 years off of VB(classic). While VB.Net is
OO capable, alot of (not all) bring some bad vb6, non OO, habits with them.

My advice is to make the clean break...... and don't try to half way do it.

Also, there are deficiencies in VB.NET (1.1 specifically).
Go here and read the entry from me.
http://groups.google.com/groups/sea...concrete+as+I+could+get,+with+no+commentary."
This is a "concrete" no commentary list. As in , I try to just state the
facts.
 
G

Guest

Regarding #1, you are correct.

Regarding #2, I highly recommend not trying to do 2 conversions at the same
time. Upgrade to VB.NET first (using the upgrade wizard + a lot of blood,
sweat, and tears). Then once the project is happily humming along in VB.NET,
take a look at whether you still want to think about converting to C#
(although as others have mentioned, it won't be for performance reasons).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter
 
B

Bjorn Abelli

...
We are planning to migrate one VB project to .Net.
But I have a common questions. can any one clarify
my below questions.

You will probably have many different answers to your questions, but here's
my 2c.
1. Is there is any advantage of using C# than VB.net.

That depends on what you mean by "advantage".
I feel both are same in terms of performance, security
and etc., Is it correct?

In general terms, yes.
2. I feel that converting from VB to VB.net is much more easier
than VB to C#. Is it correct?

Yes and no, and I would lean more towards a No...

For some basic constructs it should be very easy to just "cut'n paste" the
old code, but for the rest, where the real difference between old VB and
VB.Net lies, many developers say that it's better to change the language
altogether, so they don't *think* that VB.NET is just an upgrade of old VB.
3. Is there is any free tools available in any site which i can use to
convert it from VB to .Net (ofcourse i will do manual code fix as well).

There are *many* free tools for it out there, but the change from old VB to
..NET is not only a change of languages, it's also a change in the thinking
on how to program. These tools don't do the OOAD[*] for you...

To convert old VB to .NET in a way that makes use of .NET fully, I would
suggest that you do *most* of it manually. Start with OOAD first, to make a
skeleton of what the application should look like in terms of classes,
methods, etc.

Then you can try to "map" the old code to the new design, and maybe use
those tools to convert the parts of the old code that still are useful "bit
by bit".

But you will also probably see, that it's a possibility that in the end
there's not much of the old code that will be needed in the "converted"
application...

A common mistake for many of those that switch from another language, is to
try to fit the old way of doing things into the new language/framework,
instead of focusing on what you want the application to do, and make use of
the new language/framework's advantages to the full.


/// Bjorn A

[*] OOAD - Object-oriented Analysis and Design.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top