C# verses VB.Net Which Way to go

  • Thread starter Thread starter Robert Lario
  • Start date Start date
R

Robert Lario

C# verses VB.Net Which Way to go. I am sure this issues has come up before.
Please direct me to any good articles that cover this issue. Ideally some
neutral assessment.
 
Its not likely there is a clear answer and you aren't going to find an
article that tells you which way to go in a neutral manner.However, I can
tell you this much, if you intend to do alot of interop with office or other
com applications, you will want to use VB.NET(optional parameters and better
latebinding), and if you are going to be operating over large buffers and
require alot of performance, C#(using unsafe code) will probably be the
better choice.
Most other things are a matter of personal preference.
 
If you are totally a new guy to both of them, choose C#.
If you have a project to be done in days, and you are familiar with VB6,
then choose VB.Net.
Other wise, choose one by a coin.
 
Hi Robert,

As Lario suggested, choosing between C# and VB.NET is mainly
a "lifestyle" choice. There have been heated debates in many
newsgroups, most often turning into flames :-). So ultimately it
depends on which language developers in your project are
comfortable with to adopt. For developers coming from a C++/Java
background, the natural choice is to adopt C#, whereas developers
from a VB backgroud are generally inclined to transition to VB.NET.

For an article on the syntactical comparison on the
differences between the 2 languages, please refer to the following link:
http://www.4guysfromrolla.com/webtech/012702-1.shtml

Regards,
Aravind C
 
If you are used to VB-choose VB.NET
Daniel O'Connell said:
Its not likely there is a clear answer and you aren't going to find an
article that tells you which way to go in a neutral manner.However, I can
tell you this much, if you intend to do alot of interop with office or other
com applications, you will want to use VB.NET(optional parameters and better
latebinding), and if you are going to be operating over large buffers and
require alot of performance, C#(using unsafe code) will probably be the
better choice.
Most other things are a matter of personal preference.
 
A.A. Fussy said:
If you are used to VB-choose VB.NET

I don't consider that a good method to choose. Deciding on a language based
on what you used before instead of the task at hand is a foolish choice,
imho.
 
For better market opportunities choose C#. This does not make much
difference to the project, but to you personally choosing C# will give you
better marketability.

I still do not understand why but the salary difference between a C#
programmer and a VB.NET programmer is as much as 20K. I think it might be to
do with the fact that...probably market is thinking that, normally C++/java
programmers (as many posts are suggesting) will migrate to C# and they have
better object oriented concepts. Is that why there is a salary difference of
about 20K? May be....
 
Hi Daniel,

In this context (between C# and VB.NET) what task is being solved by one
language than the other? They both are capable of solving the problem in
equal terms and the ultimate result is in IL right?
 
Srinivas Kotipalli said:
Hi Daniel,

In this context (between C# and VB.NET) what task is being solved by one
language than the other? They both are capable of solving the problem in
equal terms and the ultimate result is in IL right?

Both are possible, but each does provide a few small bits to help. As I
outlined in my first post, if you are dealing with alot of COM interop, VB
is invaluable with allowing you to use optional parameters and late binding,
instead of large amounts of empty values passed in which you are required to
in C#.
Same goes for image processing or large amounts of native interop, for
example. C#'s unsafe code facility allows you to more directly and simply
work with the data in a performant and efficent way.
If the project will not benifit from the particular facilities of either
language, then and only then should past comfort come into play, in that
case it doesn't matter what language you choose, just pick the one you want.
I can't tell you which you want, can I? :).
If you are an old VB hand, I would actually recommend starting with C#(and
if you were an old C++ hand, perhaps VB would be better, but java probably
directly to C#) . It seems that people who start with a language different
from what they were used to pick up the .NET ideals and write more .NET like
code than if they go the direct update path. I see alot of C++ in C# code
being posted and people confused as to why it doesn't work, I can only
imagine that similar things happen with VB.
 
Robert Lario said:
C# verses VB.Net Which Way to go. I am sure this issues has come up
before. Please direct me to any good articles that cover this issue.
Ideally some neutral assessment.

Use VB.NET. You won't get crazy with a case sensitive language. Each time it
didn't take two hours to get my keyboard destroyed when using C (any sort of
C in the past). I'll never understand why a customer is different from a
Customer. Don't try to explain it to me, please, I'll *hate* it (C, not my
keyboard...) forever. I won't discuss about it. Thank you for your attention
and have a nice day.

;-)
 
* "Daniel O'Connell said:
I don't consider that a good method to choose. Deciding on a language based
on what you used before instead of the task at hand is a foolish choice,
imho.

I don't think so. You can reuse your experience when choosing a
language similar to that you used before.
 
* "Daniel O'Connell said:
Both are possible, but each does provide a few small bits to help. As I
outlined in my first post, if you are dealing with alot of COM interop, VB
is invaluable with allowing you to use optional parameters and late binding,
instead of large amounts of empty values passed in which you are required to
in C#.
Same goes for image processing or large amounts of native interop, for
example. C#'s unsafe code facility allows you to more directly and simply
work with the data in a performant and efficent way.

ACK. Nevertheless I think it's better to be familiar with both
languages, VB.NET and C#. This will give you the ability to choose the
language which fits best for the solution. The ability to understand
code written in an other .NET programming language is very important too
when dealing with samples from books or the internet.
 
Hi Herfried
ACK. Nevertheless I think it's better to be familiar with both
languages, VB.NET and C#. This will give you the ability to choose the
language which fits best for the solution. The ability to understand
code written in an other .NET programming language is very important too
when dealing with samples from books or the internet.

What is the sence of that, I have seen a lot of so called programming
languages, almost all where disapeared after 5 years except C and Cobol or
changed so much that they did not look at the ones from 5 years before.

(I dont call RPG and SQL languages)

Learning one good is more than enough the first time, knowing of the other
is an advantage, but not necessary to make a program or for reading the
examples.

Reading the samples by instance in Net is reading the Net members not the
code. I recognised that there are a lot system.drawing samples not in VB.net
:-((

Cor
 
* "Cor said:
What is the sence of that, I have seen a lot of so called programming
languages, almost all where disapeared after 5 years except C and Cobol or
changed so much that they did not look at the ones from 5 years before.

I think/hope .NET will be the programming model for the next > 10 years.
Learning one good is more than enough the first time, knowing of the other
is an advantage, but not necessary to make a program or for reading the
examples.

Reading the samples by instance in Net is reading the Net members not the
code. I recognised that there are a lot system.drawing samples not in VB.net
:-((

Yesterday there was a question about how to specify registry paths in
VB.NET code. The OP asked if he must use "\\" or "\" to separate the
keys. Being familiar with at least VB.NET and C# is IMO _very_
important. Understanding the basics of a programming language doesn't
mean that you are able to write "best-practice" code, but to be able to
solve a problem with the programming language and understand solutions
written in the language.
 
Use VB.NET. You won't get crazy with a case sensitive language. Each time it
didn't take two hours to get my keyboard destroyed when using C (any sort of
C in the past). I'll never understand why a customer is different from a
Customer.

I am coming from Delphi, I agree with you that case insensitive is
excellent.
Case sensitive causes time to debug but one may argue the variable name
should be consistent to work as a professional programmer, I agree. BUT what
would happen if you defined two variables : Customer and customer, it will
make the maintanence difficult, so I prefer case insensitive.
 
The real thing is that there is no difference between the
two when it comes to performance becuase both are running
on .net framework.

If you're a C programmer then it will ber easy for you to
work on C# becuase of the sytanx, properties and approach.

The same thing if you're a VB 5/6 programmer you can
continue using in vb .net becuase of the same reason.
But either way, it's up to you to decide.

I'm using both C# and VB .net it works fine ...
Tested...
 
Back
Top