Google

Friday, May 12, 2006

Difference between C# and VB.net - Imp Points

This entry is based on the following link - http://www.willydev.net/descargas/VBCSharpWP.pdf

• C# supports following data types while vb.net doesn’t –
o Signed byte
o Unsigned short
o Unsigned int
o Unsigned long

• Left and right shift are not available in vb.net

• Postfix and prefix increment/decrement are not available in vb.net

• Pointer to member are not available in vb.net, in C# they are available in unsafe mode only

• Vb.net supports both structured and unstructured error handling while c# supports only structured one

• VB.net has a project level setting to check for overflow while C# worked under a checked or unchecked context (So far I am not very clear what exactly does it mean and how to use it). In unchecked context, overflow error are ignored.

• C# can’t pass objects by value at all…!

• To pass a parameter by reference c# uses ref keyword void ABC (ref int x)

• Vb.net has a provision for optional argument while c# doesn’t.

• Implementing Late Binding is easier in vb.net then c#, vb.net compiler calls a helper method behind the scene to implement reflection, in c# we have to code reflection to implement late binding.

• C# permits you to write unmanaged code while vb.net don’t.

1 Comments:

Blogger Utsav said...

This link contains answers to many of our questions. Some other and good questions are also their

May 15, 2006  

Post a Comment

<< Home