473,412 Members | 1,944 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,412 software developers and data experts.

Rec'g a false-positive error on a sub that uses "overrides" keywor

I have a child-class that inherits from a base class that implements an
Interface. The child class overrides a SUB from the base class that
implements a sub from the interface. (The "MapAttributesForImport" is a sub
in an interface that is implemented by the base class marked 'overridable'.)

This code was fine in VS2003/.net 1.1 and is in production.

BUT...While upgrading to the .net 2.0, VS2005 is giving me an error that
says "sub 'MapAttributesForImport' cannot be declared 'Overrides' because it
does not override a sub in a base class." This is not true and I have
verified the sub's signature matches. THE REALLY WEIRD THING IS that if I
remove the 'Overrides' keyword, the vs2005 designer then gives me an error
that says "sub 'MapAttributesForImport' shadows an overridable method in the
base class 'HRBaseExtension'. To override the base method, this method must
be declared 'Overrides' "
Thanks
--
BrettVP
Apr 10 '07 #1
1 1412
Something to Add:

This call to the baseClass is in another project within the solution. If
the reference is made against the project I receive this error. If the
reference made made to the .dll generated by the project, the error is NOT
for the "overrides" keyword in the function definition.

Thanks!!!!
--
BrettVP
"BrettVP" wrote:
I have a child-class that inherits from a base class that implements an
Interface. The child class overrides a SUB from the base class that
implements a sub from the interface. (The "MapAttributesForImport" is a sub
in an interface that is implemented by the base class marked 'overridable'.)

This code was fine in VS2003/.net 1.1 and is in production.

BUT...While upgrading to the .net 2.0, VS2005 is giving me an error that
says "sub 'MapAttributesForImport' cannot be declared 'Overrides' because it
does not override a sub in a base class." This is not true and I have
verified the sub's signature matches. THE REALLY WEIRD THING IS that if I
remove the 'Overrides' keyword, the vs2005 designer then gives me an error
that says "sub 'MapAttributesForImport' shadows an overridable method in the
base class 'HRBaseExtension'. To override the base method, this method must
be declared 'Overrides' "
Thanks
--
BrettVP
Apr 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Programatix | last post by:
Hi, I'm working on a project which includes XML WebServices and Windows Form application. The Windows Form application will call the XML WebServices to retrieve data from database. The data...
4
by: Roland Hall | last post by:
This question crosses between this group and IIS, so I have included both. I'm referencing a MSFT document: Creating Custom ASP Error Pages:...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
by: Alberto Giménez | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there! I'm doing some homework (almost finished), but now i'm reconsidering a design decission I made at the beginning. This is about error...
7
by: Spacen Jasset | last post by:
The main two desirable things I feel error handling should provide are these: 1) Debugging and diagnostic aid 2) User feedback One method that is used a fair amount it to 'say' that all...
4
by: DavideR | last post by:
I have converted a large vb6 program with an add-in that for every routine gimme the error handling: the add-in adds one line on the head of the routine "if myerrhandle then ON ERROR GOTO...
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.