Difference between VB.NET and C#. Which is faster ?

Answers were Sorted based on User's Feedback



Difference between VB.NET and C#. Which is faster ?..

Answer / sherin

Differences are
1. Difference in Syntax
2. In some oops concepts

Is This Answer Correct ?    43 Yes 7 No

Difference between VB.NET and C#. Which is faster ?..

Answer / chandramouleswar

No difference is there when you are using VB.NET OR C3.NET
as the Code is compiled to IL. Both show equal performance
when it comes to the development.

Is This Answer Correct ?    43 Yes 14 No

Difference between VB.NET and C#. Which is faster ?..

Answer / ranjith

VB.NET
1)no unsigned int
2)Loosely typed language
3)no operator overloading
4)no pointers
5)no auto XML documentation
6)no automatic memory management


C#.net

1) supports unsigned int
2)strongly typed language
3)supports operator overloading
4)supports pointers
5)supports auto XML documentation
6)supports automatic memory
management

Is This Answer Correct ?    28 Yes 15 No

Difference between VB.NET and C#. Which is faster ?..

Answer / vara prasad

In c# by default Option strict is on where as in vb.net
Option strict is off.

Is This Answer Correct ?    17 Yes 5 No

Difference between VB.NET and C#. Which is faster ?..

Answer / mohammad shahid ullah

VB.NET use the Not keyword to express logical negation.
C#.NET use the ! operator to express logical negation.

VB.NET statements are continued using the underscore(_).
C#.NET statements continue until the semiclone(;).

Is This Answer Correct ?    14 Yes 6 No

Difference between VB.NET and C#. Which is faster ?..

Answer / lifas p k

VB.NET

* 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.
* 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 parts of Visual Studio .NET compiles your
code in the background. While this is considered as an
advantage for small projects, people creating very large
projects have found that the IDE slows down considerably as
the project gets larger.


C#

* 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
re-implemented 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 ?    3 Yes 0 No

Difference between VB.NET and C#. Which is faster ?..

Answer / arash

I worked with both of them, I was comfortable with C# and when i introduced to VB.Net I don't wanna change it
its easy to write
neat and clean. trust me on this.

Is This Answer Correct ?    3 Yes 1 No

Difference between VB.NET and C#. Which is faster ?..

Answer / ajay

no difference between both two languages.both are generate
CIL code.just difference is syntax.in c#.net syntax is like
a our traditional languages c,c++,etc.but vb.net syntex is
differnt.

Is This Answer Correct ?    2 Yes 0 No

Difference between VB.NET and C#. Which is faster ?..

Answer / madhu

1)c# is case sensitive vb.net its not space sensitve
2)in vb.net abstract classes using "mustinherit" keyword,c#
we have "abstract" key word

3)vb.net has with construct which is not use in c#
4) c# allows pointers it can improve performence in some
situations.







note:Both use same frame work and spped is also very much
equalents.

Is This Answer Correct ?    4 Yes 3 No

Difference between VB.NET and C#. Which is faster ?..

Answer / umarali1981

C#:

1. In C#, variables are declared using declarators.
2. In C#, an object can only be created using new.
3. In C#, void is specified as the return type when a method
does not return a value.
4. In C#, no keyword is required to indicate an overloaded
method.
5. The current object is referred using this pointer in C#.
6.Non virtual call cannot be made in C#.
7.Compound data type is declared in C# using class, struct
and interface.
8. In C#, constructors are used to initialize an object.
9. Object cleanup can be explicitly done by destructor in C#.
10. In C#, an object is subject to asynchronous modification
using volatile keyword.
11. In C#, all the variables have to be declared before
being used.
12. In C#, default property is defined by using indexers.
13. In C#, base class can be referred using the keyword ‘base’.
14. Abstract class of C# can only be inherited and not
instantiated.
15. Sealed keyword of C# is used to denote that a class
cannot be inherited.
16. Division can be performed in C# using / operator.
17. Remainder of division can be retrieved using mod
operator of C#.
18. C# does not have exponentiation operator.
19. C# has Bitwise operators namely &,| and ^.
20. Object reference variables can be compared using ==
operator in C#.
21.The short ciruit operators in C# are && (Boolean AND) and
|| (Boolean OR).

VB.NET:

1.In VB.NET, the variables are declared using keywords such
as private, protected, friend, public, static, shared and Dim.
2.In VB.NET, an object can be created using new and
CreateObject().
3.In VB.NET, Sub is used in method declaration to indicate
that the method does not return any value.
4.In VB.NET, Overloads keyword is used to indicate an
overloaded method.
5.The current object is referred as me in VB.NET.
6.To make a non-virtual call to the current object’s virtual
method, MyClass is used in VB.NET.
7.Compound data type is declared in VB.NET using Structure.
8.In VB.NET, Sub New() is used to initialize the newly
created object.
9.Object cleanup can be done by using Finalize method in VB.NET.
10.In VB.NET, an object cannot be modified in an
asynchronous way.
11.In VB.NET, variables can be forced for explicit
declaration using Option Explicit.
12.In VB.NET, default property is defined using Default.
13.In VB.NET, base class can be referred using the keyword
‘MyBase’.
14.MustInherit keyword of VB.NET is used to denote that a
class can only be inherited and not instantiated.
15.NotInheritable keyword of VB.NET denotes that the class
cannot involve in inheritance.
16.Division can be performed in VB.NET using \ operator.
17.Remainder of division can be retrieved using %.
18.In VB.NET, exponentiation can be performed using ^ operator.
19.Bitwise operators in VB.NET are And, Or, Xor.
20.Object reference variables can be compared using Is
operator in VB.NET.
21.The short circuit operators in VB.NET are AndAlso
(Boolean AND) and OrElse (Boolean OR).

Reference:
http://onlydifferencefaqs.blogspot.in/2012/08/csharp-difference-faqs-1.html

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

What is file extension of Webservices in .Net?

0 Answers   Arigo Infotech,


Explain the difference between asp.net and asp?

0 Answers  


How to create properties and methods using controls?

0 Answers   CGI,


What are virtual destructures?

0 Answers  


What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?

0 Answers  






Explain Different kinds of methods?

0 Answers   Wipro,


How server form post-back works?

0 Answers  


How can you manage pagination on a page using .Net?

1 Answers  


What are the similarities and difference between class and structure in .net?

0 Answers  


Describe ways of cleaning up objects.

2 Answers   Wipro,


Difference between class and interface in .net?

0 Answers  


Tell about your technical profile ?

0 Answers   TNEB Tamil Nadu Electricity Board,


Categories