Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cost for .Net
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00609123
Message ID:
00619224
Vues:
20
>
>Dim x As Integer
>
>vs
>
>int x;
>
>
>I like the former..
>
>or
>
>If nCnt <= nMax Then
>   nTotal += nCnt
>   nCnt += 1
>Else
>   nTotal += nCnt
>   nCnt -= 1
>End If
>
>vs
>
>if (nCnt <= nMax)
>{
>   nTotal += nCnt;
>   nCnt++;
>}
>else
>{
>   nTotal +=nCnt;
>   nCnt--;
>}
>
>
>Again, I'll choose the former..
>


Strange, of both of your examples I prefer the later.
Curly braces are nice when you have very long pieces of code, I seem to find them easier to read then straight indentation.
And as far as int x, any typing I can save is good in my book, and i consider them equally easy to read.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform