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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us what is the native image generator?

578


Explain the difference between static page and dynamic page?

555


Name the classes that are introduced in the system.numerics namespace.

637


Describe difference between inline and code-behind?

655


What is COM Interoperability in .NET

645






Explain the different parts of an assembly?

587


What are the differences between com architecture and.net architecture?

564


How do you create threading in.net?

565


Can I write il programs directly?

571


When we use windows api in .net is it managed or unmanaged code?

570


How to customize the trace output?

563


How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?

532


Explain what are an object and a class?

569


What are three common acronyms used in .net, and what do they stand for?

533


Please explain when should you use .net web forms over asp.net mvc?

554