Tutorial :Update on technical differences between C# and VB.NET



Question:

I have searched for these and can only find posts on 2008 or earlier?

I have my own list, but I want to know if there are more?

  • Vb.NET doesn't support implicit interfaces (this really is annoying:()
  • Vb.NET doesn't support another setter protection than the getter on automatic properties
  • Vb.NET doesn't support Preprocessor Directives
  • Vb.NET doesn't support Arithmetic Overflow unchecking/checking in code
  • Vb.NET doesn't support the yield keyword (iterator blocks)
  • Vb.NET doesn't support execution of unsafe (i.e. pointer-based) operations.

And then we have the support for the environments like type coloring which is still poor in vs.net 2010 and not full support from resharper and so on but that is not any technical aspect. Have i missed something?, I have heard that there could be some differences in linq querying is that true?


Solution:1

C# still doesn't have exception filters...


Solution:2

Multiline string literal with @ in C# is missing in VB.NET. Makes long strings really annoying.


Solution:3

Probably lots more, but in my day to day work these are the ones that annoy me the most (I can't abide VB.Net):

VB.Net has optional parameters, C# does not. C# has a mechanism to generate XML documentation from code tags. C# has the using keyword C# allows you to write unsafe (eg pointer-related) code.

hth.


Solution:4

Making a component that can be called from COM is very easy in VB.Net. In C# it is almost impossible.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »