-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Sitaraman
Message 8 in Discussion
Hi Prashant In a nutshell, though the two languages have subtle differences in terms
of the features offered, it actually boils down to the semantics and grammar(to quote
gaurav), and more than anything else the existing programmer language skills that
should let u decide on which one to choose. As per Microsoft "The existing experience
of a programmer far outweighs the small differences between the two languages." I
will try to summarise the points offered in this group and also other msdn newsgroups
on the things u must consider(i wont specify it as a criteria, as it is flexible and
applies on a case-to-case basis) 1) Learning Curve : To Quote MS on the criteria
for choosing C# or VB.Net, "When you must select between Visual Basic .NET and Visual
C# .NET, decide primarily based on what you already know and what you are comfortable
with. It is easier for Visual Basic 6.0 developers to use Visual Basic .NET and for
C++/Java programmers to use Visual C# .NET" 2)Late Binding : late binding
implementation at VB is very easy compared to C#. From the performance point of view,
late binding is not required. But, in cases where u do need to use late binding in
a programmer friendly way, VB.Net is the way to go 3)Bitwise ops & unsigned code :
VB has gained >> and << bitwise operators in the latest version, although it still
can't work with unsigned types so their usefulness is limited. However C# fully
supports unsigned types 4)Optional Parameters : VB has optional parameters, C#
doesn't 5)Overloading : C# has operator overloading, VB doesn't 6)Documentation
features : C# has XML Comments that allow you to stick XML into the code to make it
self-documenting. This isn't actually a feature of C#, it's just that someone
neglected VB.NET when they put it in, but it is a smart feature to use when you want
to quickly document assemblies and applications. However currently, various plugins
exist for commenting VB Code and generating such comments in VB.Net also 7) Unsafe
Code : we can't write unsafe code using VB but we can do so in C# using the"unsafe"
and "fixed" keywords. Here note that im mentioning "writing unsafe code". A lot of
confusion exists among .Net developers btwn the terms
a) "writing" and "calling" ( as gaurav corrected Hariharan's point that "VB.NET code
can quite easily call and work with unmanaged code, and work as unsafe code too!."
b) "unmanaged" and "unsafe"
The one-stop place to understand the above mentioned point is gaurav's article
"Unsafe programming in C#", where the the terms "unsafe" and "unmanaged" is
beautifully explained and clears all doubts and ambiguities. To briefly quote gaurav :
Unmanaged code : is that code which executes outside the context of the CLR. The best
example of this is our traditional Win32 DLLs like kernel32.dll, user32.dll, and the
COM components installed on our system Unsafe code : is a kind of cross between the
managed and unmanaged codes
It executes under the supervision of the CLR, just like the managed code, but lets you
address the memory directly, through the use of pointers, as is done in unmanaged code
Some URLs to help you for the differences btwn the two languages Differences
Between Visual Basic .NET and Visual C# .NET -
http://support.microsoft.com/?kbid=308470
Explanatory MS Word document for the above URL -
http://download.microsoft.com/download/VisualStudioNET/document/1.0/WIN98MeXP/EN-US/VBCSharpWp.exe
http://support.microsoft.com/?kbid=308470 Some URLs to help u on the terms "unsafe"
and "unmanaged" Unsafe programming in C# -
http://www.codeproject.com/csharp/unsafe_prog.asp Writing Unsafe code using C# -
http://www.codeproject.com/csharp/unsafe.asp Outside the Bounds -- Memory
Management, Unmanaged Code, and the Use of Unsafe -
http://www.yasd.com/tutorials/c_sharp/chap17_1.htm &
http://www.yasd.com/tutorials/c_sharp/chap17_2.htm hope this helps regards, sr
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]