Does anybody know how to retrieve only the implemented interfaces of a
specific, class, not those that are implemented by inherited classes?
Type.GetInterfaces() gets me everything, but I'm only interested in the
immediately implemented interfaces.
It looks like GetInterfaces() returns the interfaces in order of the
implementation hierarchy more or less, but I still can't tell from there
where my top level implementation stops and the inherited interfaces begin.
Any ideas how to do this?
TIA,
+++ Rick ---

Signature
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
cody - 04 May 2004 12:39 GMT
> Does anybody know how to retrieve only the implemented interfaces of a
> specific, class, not those that are implemented by inherited classes?
[quoted text clipped - 5 lines]
> implementation hierarchy more or less, but I still can't tell from there
> where my top level implementation stops and the inherited interfaces begin.
You could retrieve all interfaces of the baseclass and then subract them
from the list.
But this only works if not both the class and its baseclass implemtent both
the same interface twice:
interface I{}
class A:I{}
class B:A,I{}
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
cody - 04 May 2004 12:44 GMT
> Does anybody know how to retrieve only the implemented interfaces of a
> specific, class, not those that are implemented by inherited classes?
[quoted text clipped - 7 lines]
>
> Any ideas how to do this?
in the case I mentioned you can regognize a doubly implemented interface if
you find some method of the interface in the class which has the NewSlot
flag set.
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk