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

What’s different between process and application in .net?

590


Is Driver Script any how related to AOM?

614


What is .net3.5?

599


What is managed code execution?

601


What are the authentication methods in .net?

569






What is WSDL? Explain its architecture?

646


What is boxing and un-boxing in .net?

595


How do we access crystal reports in .net?

583


Explain memory-mapped files.

632


What is shared and repeatable inheritance?

551


What is file extension of Webservices in .Net?

574


What is implement a generic action in webapi?

721


Explain boxing and unboxing in .net.

567


What is the advantage of .net core?

548


How will you make .NET programs work in Linux ?

1488