There is nothing new under the sun...
-
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done) -
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done):doh:
-
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done)Zen coding.
cheers Chris Maunder
-
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done)Duncan Edwards Jones wrote:
Fortunately the compiler just ignores this so no actual harm done
Which proves that we already have machine that outsmarts the men... :-D
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
-
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done)When I see code like this, I sometimes suspect it may have been copied/pasted from a De-Compiler (such as IL Spy). I mean why on earth would someone go to the trouble of typing that?
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
When I see code like this, I sometimes suspect it may have been copied/pasted from a De-Compiler (such as IL Spy). I mean why on earth would someone go to the trouble of typing that?
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
Yeah - or it could be a stub left behind when whatever extra work used to go on in the constructor was removed...or worst of all it may be a cargo cult coding issue.
-
Public Sub New()
MyBase.New
End SubSort of implied anyway - but the fun fact is that the class that has this constructor doesn't actually explicitly inherit anything...so Mybase is
object
. (Fortunately the compiler just ignores this so no actual harm done)I write constructors such as that. Only when I have multiple constructors though. At least when you're going to change that code to call another constructor you know the call to the base class's constructor is gone (and probably going to be the default). I'd rather write too much code (such as access modifiers even though they're the default) and make sure everyone knows I really wanted to call that constructor or have that access modifier than write too few and accidentally use a default I didn't intend. Especially since I switch a lot between VB and C# and both have different defaults. Like a co-worker who doesn't write access modifiers. When I confronted him about it he said "everyone knows the default is public!". Turned out the default was internal :)