Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# equivalent of VB With - Endwith
Message
De
14/04/2012 01:55:42
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01541144
Message ID:
01541507
Vues:
37
>>>>>> Of course the argument most often put forward by the VB camp for WITH....ENDWITH is that it reduces the amount of typing required.
>>>>>
>>>>>Some time ago I finally switched from VB.NET to C#. As silly as it sounds, one of my reasons was the necessity to use underscores in VB multi-line statements.
>>>>>
>>>>>I agree that ending statements with the semicolon is also questionable. But for me the underscores were much worse.
>>>>
>>>>As Craig pointed out you can (mostly) rely on implicit line continuation in VS2010. But I just do not like the general verbosity of VB. eg
static string X(out string s, int[] i) { }
>>>>becomes:
>>>>Private Shared Function X(ByRef s As String, i As Integer()) As String
>>>>End Function
So VB requires twice as many characters :-}
>>>
>>>Someones gotta say it , VB sucks !!! Lol
>>
>>
>>The problem I have experienced with VB is that it will let you do things that may work and then break when you release an application to production. C# does not let you get away with anything.
>
>That's less true than it was before C# 4.0. Some of the new features allow you to compile cleanly, then blow up at run time.

I'm not sure what either of you are referring to.
The only thing that springs to mind is programming VB with 'Option Expicit' off ' (which, to me, means you deserve everything you get :-} )
Same applies to a lesser extent to 'Option Strict'

Other than those can you provide an example of a problem?
Of course, dynamic stuff used unwisely can get you into the same hole - but that's true of both C# and VB.NET.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform