I need to assign an eventHandler to an object, in this way:
_Element.AddHandler(UIElement.MouseLeftButtonUpEvent,
new RoutedEventHandler(Vars.Digit), true);
but, in fact, I only have a string that contains "Digit" or other method name in the Vars object instance.
It is possible to achieve this using reflection or other kind of trick?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…