Theory about applications - [TA1]
Contents
Question
Main differences between C# and VB.NET (handlers, case sensitivity, delimitators, brackets, arrays, generic classes, etc.)
Syntax differences
The first differences that can be delineated are clearly the ones related to syntax, as they immediately catch the eye, and they can be outlined in the following table:
feature | C# | VB.NET |
---|---|---|
Syntax | C-like syntax and code structure | Similar to the English language |
Case Sensitivity | Is case-sensitive | Is case insensitive |
Shadowing | Not supported | Supported |
Hiding | Supported | Not supported |
Statement Termination | Is specified through a semicolon ; |
It is implicit with a new line |
Keyword differences
feature | C# | VB.NET |
---|---|---|
Variable Declaration | Declared through the use of declarators |
Declared through the use of keywords (Private, Public, Protected, Dim ...) |
Object Creation | New is used |
New, CreateObject() are used |
Class Declaration | Class <implementation> is used |
Class is used |
Overloading | It is done automatically | Needs to be specified through the keyword Overloads |
Object Reference | The keyword this is used |
The keyword Me is used |
Additional differences
feature | C# | VB.NET |
---|---|---|
Error Handling | Supports only structured error handling | Supports structured and unstructured error handling |
Usage | Used for the development of desktop-based applications | Used for the development of Microsoft-Based applications |