Differences between C# and VB.Net??

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hi,
Are there any differences between C# and VB.Net besides syntax?
Performance-wise, how do they compare?

Thanks,
Dan
 
Aside from the obvious syntax differences between VB.Net and C#, there are
some language features that are present in one but not the other. For
example,

* VB.Net supports having optional parameters, whereas C# doesn't.
* C# doesn't have the equivalent of VB's "With / EndWith" statements.
* (I'm sure there are C# language features that aren't available in VB, but
I just can't think of any at the moment.)

Also, aside from language differences, you may find various subtle
differences in terms of the development experience inside Visual Studio.
For example,

* intellisense may work slightly differently in certain cases (especially
with project-to-project references)
* VB has some different project properties than C# (Option Explicit, etc.)
* VB builds the assemblies to the "bin" directory by default, whereas C#
builds the assemblies to "bin\Debug" or "bin\Release".

These are just some random examples off the top of my head. There are
probably a lot more, and I don't know that anyone has a comprehensive list.
But in the end, once your project has been compiled, it's all just IL in
your assembly, so there's no significant difference at this point. Perhaps
someone has done perf comparisons, but I don't know of any. I wouldn't
expect there to be any noticeable perf difference.

--Rajeev
 
Back
Top