langauges
What is Difference between VB.NET & C#.NET?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Dec 2, 2009, 4:08 AM
Syntax is not just matter .. but below Main Difference in features
VB.NET
C#
Microsoft.VisualBasicnamespace, 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.withconstruct: it's a matter of debate as to whether this is an advantage or not, but it's certainly a difference.Catch...When... clauses, which allow exceptions to be filtered based on runtime expressions rather than just by type.usingstatement, which makes unmanaged resource disposal simple.Lalit MPosted Dec 2, 2009, 3:13 AM
Feature
Visual Basic .NET
Visual C# .NET
Case sensitive
Not case sensitive:
response.write("Yo") ' OKCase sensitive:
response.write("Yo"); // Error Response.Write("Yo"); // OKFunctional blocks
Use beginning and ending statements to declare functional blocks of code:
Use braces to declare functional blocks of code:
{Type conversion
Implicit type conversions are permitted by default:
You can limit conversions by including an Option Strict On statement at the beginning of modules.
Type conversions are performed explicitly by casts:
Or, use type conversion methods:
Arrays
Array elements are specified using parentheses:
Array elements are specified using square brackets:
Methods
You can omit parentheses after method names if arguments are omitted:
You must include parentheses after all methods:
Statement termination
Statements are terminated by carriage return:
Response.Write("Hello")Statements are terminated by the semicolon (;):
Response.Write("Hello");Statement continuation
Statements are continued using the underscore (_):
Statements continue until the semicolon (;) and can span multiple lines if needed:
String operator
Use the ampersand (&) or plus sign (+) to join strings:
Use the plus sign (+) to join strings:
Comparison operators
Use =, >, <, >=, <=, <> to compare values:
Use ==, >, <, >=, <=, != to compare values:
Negation
Use the Not keyword to express logical negation:
Use the ! operator to express logical negation:
Object comparison
Use the Is keyword to compare object variables:
Use == to compare object variables:
Object existence
Use the Nothing keyword or the IsNothing function to check if an object exists:
Use the null keyword to check if an object exists:
Show this Link Comparison.
Amit ChoudharyPosted Dec 2, 2009, 2:41 AM
VB.net is inherited the syntax from VisualBasic 6.0 and the C#.net have the Syntax like Java...
so if you know about previous languages then you can feel the difference else you have to go through the Documentation of both......
you can use anyone of them for development just which is comfortable for you...
Please don't forget to mark the answer i have tried my best to solve you queries... if you mark them then it'll help to get some points in forum..