Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cost for .Net
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00609123
Message ID:
00619224
Views:
19
>
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform