Overloads and shadow by signature
Sun, Jul 25 2004 16:31
In VB.NET the Overloads keyword is overloaded itself, having two different meanings. One is adding a new method with the same name but different signature, and the other is shadowing a base class method with a method of the same name and signature (Hide-by-sig)
The problem is the developer can’t tell the difference unless they look closely at the base class, and its base class, all the way down to System.Object
I would like to see the VB team include a new keyword for hide by signature, such as ShadowBySig, and introduce a compiler warning if Overloads is used as hide by sig. This would allow us to remove this ambiguity over time without breaking any code, and in the long term makes code more readable, easier to understand, and less prone to accidental hiding by signature.