>
>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.