I have a small experience in VB.net and I would like to learn C#.net
What are the differences between VB.net and C#.net?
Is there any difference in performance between these two?
Apart from the syntactical differences, are there any major changes that I have to keep in mind?
In a nutshell, the main difference between C and C++ is that C is a procedural with no support for objects and classes, whereas C++ is a combination of procedural and object-oriented programming languages.
There is a major difference between C and C++. The C language is a procedural one that provides no support for objects and classes. On the other hand, the C++ language is a combination of object-oriented and procedural programming languages.
The main difference between C and C++ is that C++ is a younger, more abstract language. C and C++ are both general-purpose languages with a solid community. C is a lightweight procedural language without a lot of abstraction. C++ is an object-oriented language that provides more abstraction and higher-level features.
The Language Features section of the Wikipedia article offers a good overview. Performance is essentially equivalent in almost every aspect, from what I understand.
Performance is equivalent if you write equivalent code, but VB.NET has constructs that are in there for "backward compatibility" which should NEVER be used. C# doesn't have some of these things. I'm thinking specifically of:
Functions which are in the Microsoft.VisualBasic namespace which are members of other standard .NET classes like Trim(). The .NET classes are often faster.
Redim and Redim Preserve. Never to be used in .NET, but there they are in VB.
On Error ... instead of exceptions. Yuck!
Late binding (sometimes derisively called "Option Slow"). Not a good idea in a non-dynamic .NET language from a performance perspective.
VB is also missing things like automatic properties which makes it pretty undesirable for me. Not a performance issue, but worth keeping in mind.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With