'foo' is a 'variable' but is used like a 'method'


Over the last several months, because of my current project I have had to program in a bunch of different languages.   (The reason for this will become crystal clear early next week).  Basically, I have had to code in C#, VB, and IronPython while at the same time I have been trying learning Haskell and occasionally Ruby - and some Javascript just for fun on the weekends.  To be brutally honest, this is a major pain.

For example, the difference in the syntax for calling indexers between VB and C#

Dim foo As List(Of String) = New List(Of String)


Will not compile with the error - "Error 18 Identifier expected."

If I use the VB syntax in C#, I get my new favorite error: 'foo' is a 'variable' but is used like a 'method'

Particular annoying is the differences in For Each between C#, VB, and Python - each which has a slightly different syntax.  For some reason this has been tripping me up a lot during live demos. 

Interestingly, the whole curly brace versus END statements versus tabs (python) deal doesn't bother me at all.  Although, this shocked me.

kick it on DotNetKicks.com