G
Guest
Hi Tea
When creating an object instance like thi
Dim foo As New clsBar(
the current VB.NET documentaion says that the parentheses are optional if there are no constructor parameters
In version 2002 Visual Studio it will always insert the parentheses if you forget them, however, more annoyingly, in version 2003 it will always take them away if you type them, even though the code examples in the Help show parentheses
To say they are "optional" is therefore not true for either version
Call me anal, but I'm teaching this stuff and hate this willy-nilly bending of the syntax with each new edition of the product. Is there perhaps a switch somewhere that controls this behaviour of the editor? (Or is this just another case of wooing ex-VB6 programmers into VB.NET, because they never needed parentheses anyway?) Interestingly, parameterless non-constructor method calls still require parentheses, even in version 2003. Maybe they'll clobber that in the next version ;
Any suggestions
Cheer
Matthias
When creating an object instance like thi
Dim foo As New clsBar(
the current VB.NET documentaion says that the parentheses are optional if there are no constructor parameters
In version 2002 Visual Studio it will always insert the parentheses if you forget them, however, more annoyingly, in version 2003 it will always take them away if you type them, even though the code examples in the Help show parentheses
To say they are "optional" is therefore not true for either version
Call me anal, but I'm teaching this stuff and hate this willy-nilly bending of the syntax with each new edition of the product. Is there perhaps a switch somewhere that controls this behaviour of the editor? (Or is this just another case of wooing ex-VB6 programmers into VB.NET, because they never needed parentheses anyway?) Interestingly, parameterless non-constructor method calls still require parentheses, even in version 2003. Maybe they'll clobber that in the next version ;
Any suggestions
Cheer
Matthias