Thomas Tomiczek [mailto:[EMAIL PROTECTED] wrote:
> Well, I can tell you excactly what I am looking for :-) > > Ok, I have an inheritance hierarchy from which I ge t the last type. > > I need to run this upwards (basetype, basetype, basetype) and > process = CERTAIN of these types ONLY :-) > > So I had the idea of putting a marker interface on these, but > - = according to normal inheritance rules, the marker > interface would also = be visible on the baseclasses. > > A STATIC method (which I could find) could work, too, though, > now that I = think of it. I could just reflect on whether the > static method is = available. Hmmm... sounds like a very strange design. Sure an attribute won't work for you (passing false for the inherit parameter in Type.GetCustomAttributes)? Or do you actually need some kind of behavior from each specific type in the heirarchy? What's wrong with the base class implementing a method and subclasses overriding where necessary. Then you just require, by documented rule, the base class' method must always be called before/after/wherver the subclasses implementation runs? Just a thought, Drew [ .NET MVP | weblog: http://weblogs.asp.net/dmarsh ]
