what are the advantages of c# over vb.net?
Answers were Sorted based on User's Feedback
Answer / nikhil
C# supports two things which is not supported by VB.NET
1. Operator Overloading
2. Pointer
Is This Answer Correct ? | 20 Yes | 6 No |
Answer / chandra
c# is case sencitive,vb.net is not case sencitive,c#
statements is placed between braces but in vb,net in
between end of itself(sub .. end sub).
thank you.
Is This Answer Correct ? | 18 Yes | 5 No |
Answer / bond
C# Supports memory pointer where as VB.net dont
C# is Suitable for C,C++ Programmer
casting object type is easy in C# (object)
in vb.net Ctype(blah blah blah)
Is This Answer Correct ? | 17 Yes | 7 No |
Answer / ssr
c#.net is more secure when compare to vb.net
if any dout plz mail me
Is This Answer Correct ? | 15 Yes | 10 No |
Answer / rama chandra durai.r
The choice between C# and VB.NET is largely one of
subjective preference. Some people like C#'s terse syntax,
others like VB.NET's natural language, case-insensitive
approach. Both have access to the same framework libraries.
Both will perform largely equivalently (with a few small
differences which are unlikely to affect most people,
assuming VB.NET is used with Option Strict on). Learning
the .NET framework itself is a much bigger issue than
learning either of the languages, and it's perfectly
possible to become fluent in both - so don't worry too much
about which to plump for. There are, however, a few actual
differences which may affect your decision:
VB.NET Advantages
Support for optional parameters - very handy for some COM
interoperability
Support for late binding with Option Strict off - type
safety at compile time goes out of the window, but legacy
libraries which don't have strongly typed interfaces become
easier to use.
Support for named indexers (aka properties with
parameters).
Various legacy VB functions (provided in the
Microsoft.VisualBasic namespace, and can be used by other
languages with a reference to the
Microsoft.VisualBasic.dll). Many of these can be harmful to
performance if used unwisely, however, and many people
believe they should be avoided for the most part.
The with construct: it's a matter of debate as to whether
this is an advantage or not, but it's certainly a
difference.
Simpler (in expression - perhaps more complicated in
understanding) event handling, where a method can declare
that it handles an event, rather than the handler having to
be set up in code.
The ability to implement interfaces with methods of
different names. (Arguably this makes it harder to find the
implementation of an interface, however.)
Catch ... When ... clauses, which allow exceptions to be
filtered based on runtime expressions rather than just by
type.
The VB.NET part of Visual Studio .NET compiles your code in
the background. While this is considered an advantage for
small projects, people creating very large projects have
found that the IDE slows down considerably as the project
gets larger.
C# Advantages
XML documentation generated from source code comments.
(This is coming in VB.NET with Whidbey (the code name for
the next version of Visual Studio and .NET), and there are
tools which will do it with existing VB.NET code already.)
Operator overloading - again, coming to VB.NET in Whidbey.
Language support for unsigned types (you can use them from
VB.NET, but they aren't in the language itself). Again,
support for these is coming to VB.NET in Whidbey.
The using statement, which makes unmanaged resource
disposal simple.
Explicit interface implementation, where an interface which
is already implemented in a base class can be reimplemented
separately in a derived class. Arguably this makes the
class harder to understand, in the same way that member
hiding normally does.
Unsafe code. This allows pointer arithmetic etc, and can
improve performance in some situations. However, it is not
to be used lightly, as a lot of the normal safety of C# is
lost (as the name implies). Note that unsafe code is still
managed code, i.e. it is compiled to IL, JITted, and run
within the CLR.
Is This Answer Correct ? | 4 Yes | 1 No |
C# is case sensitive but VB.net is not.
Is This Answer Correct ? | 4 Yes | 1 No |
C# supports two things which is not supported by VB.NET
1. Operator Overloading
2. Pointer
Is This Answer Correct ? | 8 Yes | 6 No |
Answer / sdfsf
explicit interface implementation.By prefixing interface name
operator overloading
xml documentation generated from source code files
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / manish tiwari
c# is the main active centr control of vb.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajesh
the gifference is C# works on pointers,overloading and also
it is more reliable and readable than VB
Is This Answer Correct ? | 5 Yes | 9 No |
Is null empty or whitespace c#?
What's the c# syntax to catch any possible exception?
What is appdomain in c#?
Explain the types of assemblies in .net?
why C#.net doesnot support prcedures and why it supports structs,functions
FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ?EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER?????PLEASE REPLY...
Can we have only “try” block without “catch” block in c#?
What is sealed class in c#?
How do I create multifile assembly?
What is an indexer in c#?
which access modifier we can declare the abstract class?
What is Interface Polymorphism?with E.g