0

Which is better c# or visual basic?

ellaborate your answer please..

9th Oct 2017, 7:17 AM
Arl Kheem Rey B. Galario
Arl Kheem Rey B. Galario - avatar
2 Respostas
+ 6
As a .net user i always recommended u that c# is best Features of C# not found in Visual Basic .NET Multi-line comments. In VB this is handled in the Visual Studio IDE editor, which adds comment markers to selections. Static classes (classes which cannot contain any non-static members, although VB.NET's Modules are essentially static classes with additional semantics) Can use checked and unchecked contexts for fine-grained control of overflow/underflow checking Iterative for-loops can contain multiple conditionals, such as for(int i = 0; i < 10 && somethingTrue; i++). This is a legacy of C, where the for statement is basically syntactic sugar for a while statement. The getter and setter of a property may implement separate is best interfaces. In VB you'd have to define two properties instead: a read-only property implementing one interface, and a write-only property implementing the other interface.
9th Oct 2017, 7:29 AM
Scooby
Scooby - avatar
+ 6
Features of Visual Basic .NET not found in C# Variables can be declared using the WithEvents construct. This construct is available so that a programmer may select an object from the Class Name drop down list and then select a method from the Declarations drop down list to have the Method signature automatically inserted Auto-wireup of events. VB.NET has the Handles syntax for events, which connects event handlers to object variables rather than to objects. Firing of events is done with the RaiseEvent keyword, giving the IDE the chance to show a list of available events to pick from. RaiseEvent implicitly checks if there are any event handlers wired up. (in C# raising an event is syntactically identical to calling a procedure, and it requires an additional line of code to check for wired event handlers) Delegates for events don't need to be declared. They are implicitly declared in the declaration of the events. Referring to an object using an unqualified dot reference, using the With ... End With structure
9th Oct 2017, 7:30 AM
Scooby
Scooby - avatar