PIEBALDconsult wrote:
Which is the only name that matters
Unless you target another architecture than the CLR, of course, in which case you are free to name generated symbols as you see fit. Who said that it is forbidden to directly generate IBM 360 assembly from C# ?
PIEBALDconsult wrote:
That's funny, I know that if a method is declared that has no name and returns an instance of the class, it is a constructor.
Funnier, my copy of "The C# Programming Language", ISBN 0-321-15491-6 by Anders Hejlsberg, Scott Wiltamuth & Peter Golde, on chapter 10.10 "Instance Constructors", page 344 has strong hints that they understand the constructor name to be similar to a method name, not a type name:
The identifier of a constructor-declarator must name the class in which the instance constructor is declared. If any other name is specified, a compile-time error occurs.
Similarly, my Visual Studio highlights the constructor as a method name, not as a type. But hey, Visual Studio is a Microsoft product, these are known not to follow recognized standards. And who knows, maybe this Hejlsberg guy is just a newbie :-)
-- Quidquid latine dictum sit, altum sonatur. http://streambolics.flimbase.com S. L.