Interface Inheritance - work around

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

All,

This issue is still irritating me. I would like to know
conclusively if a class inheriting an interface can be
extended with methods not in the inherited interface. So,
if someone can answer the question or provide some
insight, please do!

However, I've got a production schedule to meet. In the
interest of time I came up with a work around, which I
want to share.

Since each (implementation) class has the core methods I
want plus a few extras. I've changed the object
declaration from IItem (interface object) to object
(generic object). This gives me the flexibility of
assigning any item to the object (as I enjoyed with the
IItem object), and using both the base and extended
methods of the object.

Regards,
Adam
 
Hi Adam,

Thank you for sharing the resolution with us, I believe this will benefit
all the community members here. It is somewhat strange, if possible would
you post some sample so I can do some test and reproduce the issue?

Please feel free to reply to the threads if you have any concerns or
questions.


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Adam" <no_spam@no_where.com>
| X-Tomcat-NG: microsoft.public.access.modulesdaovba
|
| All,
|
| This issue is still irritating me. I would like to know
| conclusively if a class inheriting an interface can be
| extended with methods not in the inherited interface. So,
| if someone can answer the question or provide some
| insight, please do!
|
| However, I've got a production schedule to meet. In the
| interest of time I came up with a work around, which I
| want to share.
|
| Since each (implementation) class has the core methods I
| want plus a few extras. I've changed the object
| declaration from IItem (interface object) to object
| (generic object). This gives me the flexibility of
| assigning any item to the object (as I enjoyed with the
| IItem object), and using both the base and extended
| methods of the object.
|
| Regards,
| Adam
|
| >-----Original Message-----
| >All,
| >
| >I've kinda worked myself into a corner, and I was hoping
| >you could shed some light.
| >
| >I've got an application that uses an interface class item
| >(IItem). I've also got a number of implementation classes
| >that inherit their interface from IItem. In some cases,
| >I've only implemented methods defined in IItem, but in
| >others I've extended the avaliable methods and
| properties.
| >
| >My problem is, in cases where a class implements the
| IItem
| >interface, and it has additional methods and properties.
| I
| >cannot see those additional methods or properties. That
| >make any sense?
| >
| >I need a way to see both the implemented methods and
| >additional methods.
| >
| >Regards,
| >Adam
|
 
Back
Top