Greg,
Thank you for your response.
Larry
> No as a general rule there is no good way to do this unless thought is put
> in ahead of time to either place a "NonImplementedAttribute" or to have an
> interface which defines whether or not functionalities are available (i.e.
> Stream.CanSeek)
Of course catching a NotSupportedException is far more efficient than
reflection, potentially even more efficient than checking a return value
because exception handling is outside the critical path.
>> Is there a way to tell via reflection whether a class does not support
>> an event/method/property defined in a base class? For example,
[quoted text clipped - 12 lines]
>> Thanks,
>> Larry
Larry Minton - 04 May 2006 06:44 GMT
>Of course catching a NotSupportedException is far more efficient than
>reflection, potentially even more efficient than checking a return value
>because exception handling is outside the critical path.
It depends on the problem being solved. If you read my initial
message, having a NonImplementedAttribute would be much more
efficient. No point in trying to attach to the event if the event
isn't supported...
Larry