473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

why can't you declare new as overridable?

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
1 1965
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marina | last post by:
Hi, I have a class that inherits from CollectionBase, and I'm trying to override its Count property. As per the documentation, this property is overridable - so I should be able to do this. So...
1
by: bminder | last post by:
In the asp.net pages below, Common.vb has an overridable Page_Load sub. In the consuming page, Two.aspx, the Page_Load sub is inherited, but for some reason it (Overrides Sub Page_Load) executes...
1
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
1
by: skootr | last post by:
I have a Public Interface defined in a class module. I also have a form that implements that interface After building the solution, I added an Inherited Form (inherited from the above-mentioned...
1
by: J. Alan Rueckgauer | last post by:
I have a simple form with a user control docked to the top (a panel, a picturebox, and 2 labels), a panel docked to the bottom, and a panel in the middle that has its docking set to fill. If I...
27
by: Just Me | last post by:
I made a Usercontrol that must have AutoScroll set to true when it is used. So I set it to True in the Load event. However the property still shows in the properties window when the control is...
2
by: MDFS | last post by:
Hi, I was wondering if anyone has any information on the performance impact of using functions declared as overridable? To Explain more fully; By default every function created in VB is NOT...
6
by: Bill foust | last post by:
I'm running into a situation there I think an operator overload would solve the issue, but I'm unable to make it work for some reason. If anyone can help here I would appreciate it. I have a...
3
by: grawsha2000 | last post by:
Hello, I have an overridable function in a base class (to do some basic database works) that gets inherited by many concrete classes. These concrete classes expands the work of that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.