Usually, I know what kind of specific control raises a certain event so I can make, inside the event handler, a reference to it by a manual downcast of its sender parameter like this (assuming that sender is a Button):
var refToSender = (Button)sender;
Now, if for any reasons I cannot know the exact type of the sender, is it possible to make an automatic downcast without the necessity of using conditional blocks? In other words, is there the possibility to write something like this:
var refToUnknownSender = (Magic_here)sender;