I'll illustrate my question with my use-case. While implementing a variant of the command pattern I want to have commands that are optionally undoable.
For this the command will have an Execute method that is a must-override and an Undo method that can optionally be overriden.
What I'm looking for is a way to check at runtime (from the parent) if the child on the wire has implemented the Undo method, without calling it ofcourse.
Just curious if this is possible.
I know my ways to work around this, e.g. have attribute Undoable in baseclass, or introduce a CommandUndoable class (which is a child of Command) to be inherited from by undoable commands.













