VB.Net vs C#.Net

Hi Experts,

I was told that the Active Directory was built using the C# language.

What I was wondering was that, VB.Net and C#.Net are equal in the ability to write code.

But are there any small or major differences between that two languages that can do and can not do?

Thanks in advance.
Who is Participating?
Jacques Bourgeois (James Burger)PresidentCommented:
Active Directory was probably written in C++, that was the language used the most at that time, specially for anything close to the system in those times. It is still the case. Although C# and C++ are similar at first sight, there is a big difference between them, and that is the fact that C++ has pointers and enables the programmer to manipulate memory directly. This is why C++ is still the preferred way to code for system applications.

In .NET, it's not the language that does the job, it's the framework. The language is just a way to declare variables, constants, classes, methods and properties. Once the program is compiled, you could not tell which language was used.

There were little differences in the past (VB had optional parameters but C# did not C#, C# had anonymous types but VB did not). As CodeCruiser pointed out, Microsoft was tired of having people complaining about those little differences, and have decided to bring similar features to both from now on.

Your choice between them is purely a question of preference, usually based on your background as a programmer.

MikeMCSD is wrong when he says that VB "is not being used that much anymore". It is true that recently, we have started to see more C# than VB. But it is not because VB is not used. It is simply because programmers coming from C, C++ and Java are attracted to C# because it is their experience. These languages share a lot of syntax features. On the other hand, VB.NET attracts mostly VB classic (VB6) and VBA programmers. Anybody coming from a platform other than Microsoft will automatically select C#, because there is no VB on other platforms.

In my experience as an in-house trainer in VB.NET, and you can see it by the questions here on Expert-Exchange, VB is still very alive.
Mike KlineCommented:
Good comparison from Buggy, where did you get the info about C#,  the oldest parts of AD go back over 20 years...before c#

Nice history here   http://blog.joeware.net/2008/08/11/1420/


Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

>> VB.Net and C#.Net are equal in the ability to write code . . .

for the most part in everyday coding, probably not.

But VB.Net is not being used that much anymore and C#.Net has really taken over.
I started with VB and liked it, but had to change over to C#
because everything is in C# now.
If you are going to choose one, choose C#.
käµfm³d 👽Commented:
BuggyCoder's link is good, but it is also a bit dated. There are a few inconsistencies and omissions on the page not to mention a lack of newer features added in the newer versions of the languages (i.e. the stuff that was released around when .NET 4.0 was released). The lack of newer features is only due to the time when the article was written, though, so I don't hold it against the author. It is a solid comparison. Just know that it is not all-encompassing  = )
Recently, both VB.NET and C# teams have been moved into a same management and all new features will be added to both C# and VB.NET concurrently.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.