By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

why can't you declare new as overridable?

P: n/a
Hi.

I'm just wondering how come the compiler complains when
you declare a new sub as overridable but it then lets you
define multiple new subs with different interfaces,
essentially overriding each other.

For example, this doesn't work:

public overridable sub new()
end sub

public overrides sub new(byval x as string)
end sub

But this does:

public sub new()
end sub

public sub new(byval x as string)
end sub

Obviously, I can still do what I need to do, but I'd like
to understand why this is so.

Thanks,

skain
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello,

"steve kain" <sk***@ileo.com> schrieb:
I'm just wondering how come the compiler complains when
you declare a new sub as overridable but it then lets you
define multiple new subs with different interfaces,
essentially overriding each other.


This doesn't make sense because constructors are not inherited.

Regards,
Herfried K. Wagner
--
MVP VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.