advanced inheritance in arguments
I need help with C# inheritance, basically I have this function
now on the code at
now on the code at
child.ReplaceTriggered += (sender, element) => my problem is that element here is a FrameworkElement but I know fully well that this object inherits IPopup in my own code because all instance of element I pass through here inherits IPopup, now, my SetTopView function here accepts T where T should inherit both FrameworkElement and IPopUp, how do I make the compiler accept element here in the code to also have derrived from IPopup?